Private Sub ComboBox1_click()
Sheets(1).Unprotect
If ComboBox1.ListIndex = -1 Then
TextBox2.Text = ""
Else
Label12.Caption = ComboBox1.List(ComboBox1.ListIndex, 1)
Label13.Caption = ComboBox1.List(ComboBox1.ListIndex, 2)
Label14.Caption = ComboBox1.List(ComboBox1.ListIndex, 3)
Label15.Caption = ComboBox1.List(ComboBox1.ListIndex, 4)
Label16.Caption = ComboBox1.List(ComboBox1.ListIndex, 5)
Label17.Caption = ComboBox1.List(ComboBox1.ListIndex, 6)
Label18.Caption = ComboBox1.List(ComboBox1.ListIndex, 7)
Label19 = ComboBox1.List(ComboBox1.ListIndex, 9)
End If
TextBox1 = Format(TextBox1, "00000")
Sheets(1).Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets(1).EnableSelection = xlUnlockedCells
End Sub
Private Sub CommandButton1_Click()
If ComboBox1 = "" Then
MsgBox "Bitte einen Teilnehmer auswählen!"
Exit Sub
End If
Dim x As Long
Z = Sheets(1).UsedRange.Rows.Count
x = Label19
temp = 0
For i = 2 To Z
If Cells(i, 1) = x Then
temp = 1
Exit For
End If
Next
If temp = 1 Then
Unload Me
zeile2 = i
UserForm9.Show
Else
MsgBox " unbekannter Fehler!"
End If
End Sub
Private Sub CommandButton3_Click()
Unload Me
End Sub
Private Sub textbox1_keypress(ByVal keyAscii As MSForms.ReturnInteger)
Select Case keyAscii
Case 48 To 57
Case Else: keyAscii = 0
End Select
End Sub
Private Sub UserForm_activate()
Dim Zelle As Range
ComboBox1 = ""
zeille = Cells(Rows.Count, 2).End(xlUp).Row
For Each Zelle In Sheets(1).Range("B5:B" & zeille)
ComboBox1.AddItem Zelle.Value & " " & Zelle.Offset(0, 1).Value
ComboBox1.List(ComboBox1.ListCount - 1, 1) = Zelle.Offset(0, 2).Value
ComboBox1.List(ComboBox1.ListCount - 1, 2) = Zelle.Offset(0, 3).Value
ComboBox1.List(ComboBox1.ListCount - 1, 3) = Zelle.Offset(0, 4).Value
ComboBox1.List(ComboBox1.ListCount - 1, 4) = Zelle.Offset(0, 5).Value
ComboBox1.List(ComboBox1.ListCount - 1, 5) = Zelle.Offset(0, 6).Value
ComboBox1.List(ComboBox1.ListCount - 1, 6) = Zelle.Offset(0, 7).Value
ComboBox1.List(ComboBox1.ListCount - 1, 7) = Zelle.Offset(0, 8).Value
ComboBox1.List(ComboBox1.ListCount - 1, 8) = Zelle.Offset(0, 9).Value
ComboBox1.List(ComboBox1.ListCount - 1, 9) = Zelle.Offset(0, -1).Value
Next
End Sub
Vielen lieben Dank!