Simon schrieb am 08.12.2008 20:29:42:
 
 Dim intZeile As Integer
 Dim intZaehler As Integer
 
 'erster Zähler funktioniert
 Private Sub CommandButton1_Click()
 intZeile = 1
 For intZaehler = 1 To 100 Step 1
 ActiveSheet.Cells(intZeile, 3) = ActiveSheet.Cells(intZeile + 1, 2)
 ActiveSheet.Cells(intZeile, 5) = ActiveSheet.Cells(intZeile + 1, 4)
 ActiveSheet.Cells(intZeile, 7) = ActiveSheet.Cells(intZeile + 1, 6)
 
 
 ActiveSheet.Cells(intZeile + 1, 2).Value = ""
 ActiveSheet.Cells(intZeile + 1, 4).Value = ""
 ActiveSheet.Cells(intZeile + 1, 6).Value = ""
 intZeile = intZeile + 2
 Next
 
 For intZaehler = 2 To 50 Step 1
 Rows(intZaehler).Delete
 Next
 End Sub
 
 
 
 Option Explicit
 Dim intZaehler1 As Integer
 Dim intZaehler2 As Integer
 Dim intZaehler3 As Integer
 Dim intZaehler4 As Integer
 Dim curRate1    As Currency
 Dim curRate2    As Currency
 Dim curRate3    As Currency
 Dim curRate4    As Currency
 
 
 Private Sub abbrechen_Click()
 Unload Me
 End Sub
 
 
 Private Sub OK_Click()
 Dim intZeile As Integer
 Dim curZahlung As Currency
 curZahlung = 0
 
 'Eingabebereiche Tabellenblatt löschen
 Sheets("Abschlag_Monat").Select
 Range("B4:E15").Select
 Selection.ClearContents
 Range("B4").Select
 
 'Werte für Mieter 1 übertragen
 curZahlung = TextBox1.Value
 If MO1 = True Then
 intZaehler1 = 12
 End If
 If QU1 = True Then
 intZaehler1 = 4
 End If
 If intZaehler1 = 2 Then
 intZaehler1 = 2
 End If
 
 Select Case intZaehler1
     Case 12
         For intZeile = 4 To 15 Step 1
         ActiveSheet.Cells(intZeile, 2).Value = curZahlung
         Next intZeile
     Case 4
         For intZeile = 4 To 13 Step 3
         ActiveSheet.Cells(intZeile, 2).Value = curZahlung
         Next intZeile
         
     Case 2
        ActiveSheet.Cells(4, 2).Value = curZahlung
        ActiveSheet.Cells(10, 2).Value = curZahlung
 End Select
 
 Private Sub CommandButton2_Click()
 
 Dim strAltersruppe As String
  intZeile = ActiveSheet.Cells(1, 12).Value
 
 ActiveSheet.Cells(intZeile, 2).Value = ComboBox1
 ActiveSheet.Cells(intZeile, 3).Value = ComboBox2
 ActiveSheet.Cells(intZeile, 4).Value = TextBox1
 
 
 If CheckBox1 = True Then
 ActiveSheet.Cells(intZeile, 6) = "1"
 Else
 ActiveSheet.Cells(intZeile, 6) = "0"
 End If
 
 If CheckBox2 = True Then
 ActiveSheet.Cells(intZeile, 7) = "1"
 Else
 ActiveSheet.Cells(intZeile, 7) = "0"
 End If
 
 If CheckBox3 = True Then
 ActiveSheet.Cells(intZeile, 8) = "1"
 Else
 ActiveSheet.Cells(intZeile, 8) = "0"
 End If
 
 If CheckBox4 = True Then
 ActiveSheet.Cells(intZeile, 9) = "1"
 Else
 ActiveSheet.Cells(intZeile, 9) = "0"
 End If
 
 If OptionButton1 = True Then
 strAltersgruppe = "A"
 End If
 
 If OptionButton4 = True Then
 strAltersgruppe = "B"
 End If
 
 If OptionButton2 = True Then
 strAltersgruppe = "C"
 UserForm2.Show
 End If
 
 If OptionButton5 = True Then
 strAltersgruppe = "D"
 UserForm2.Show
 End If
 
 If OptionButton3 = True Then
 strAltersgruppe = "E"
 UserForm2.Show
 End If
 
 
 
 If OptionButton6 = True Then
 strAltersgruppe = "F"
 End If
 
 ActiveSheet.Cells(intZeile, 5) = strAltersgruppe
 
 ActiveSheet.Cells(intZeile, 1) = intZeile - 2
 intZeile = intZeile + 1
 ActiveSheet.Cells(1, 12) = intZeile
 Me.Hide
 End Sub
 
 Private Sub CommandButton1_Click()
 Unload Me
 End Sub
 
 
 
 
 
 
 Bitte stehen lassen bis morgen Mittag :-)     |