Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub cmdEnd_Click()
- Dim startIndex As Integer 'Zähler für die jeweilige Reihe
- Dim ws As Worksheet
- Dim currentNr As String
- Dim i As Integer
- startIndex = 2
- currentNr = ActiveSheet.Cells(startIndex, 1).Value
- For i = startIndex To 100
- If (currentNr = "") Then
- ActiveSheet.Cells(startIndex, 1).Value = startIndex - 1
- ActiveSheet.Cells(startIndex, 2).Value = DTPicker1.Value
- ActiveSheet.Cells(startIndex, 3).Value = TextBox2.Value
- ActiveSheet.Cells(startIndex, 5).Value = TextBox3.Value
- ActiveSheet.Cells(startIndex, 6).Value = TextBox4.Value
- ActiveSheet.Cells(startIndex, 8).Value = ComboBox1.Value
- ActiveSheet.Cells(startIndex, 9).Value = TextBox5.Value
- If (OptionButton1.Value = True) Then
- ActiveSheet.Cells(startIndex, 7).Value = "J"
- Else
- ActiveSheet.Cells(startIndex, 7).Value = "N"
- End If
- Else
- startIndex = startIndex + 1
- currentNr = ActiveSheet.Cells(startIndex, 1).Value
- End If
- Next i
- End Sub
Add Comment
Please, Sign In to add comment