ich hoffe ihr könnt mir helfen. Ich habe eine ComboBox, welche soweit gut funktioniert. Wenn ich allerdings einen Wort direkt in die ComboBox eingebe was es nicht gibt bekomm ich ein Laufzeitfehler 1004 (Anwendungs- oder objektdefinierter Fehler). Auch wenn ich einen Buchstabe eingebe und diesen wieder entferne.
Private Sub ComboBox99_Change()
If ComboBox99.ListIndex 0 Then
TextBox2 = Cells(ComboBox99.ListIndex + 1, 3)
TextBox7 = Cells(ComboBox99.ListIndex + 1, 5)
TextBox11 = Cells(ComboBox99.ListIndex + 1, 10)
TextBox12 = Cells(ComboBox99.ListIndex + 1, 12)
TextBox13 = Cells(ComboBox99.ListIndex + 1, 13)
Else
TextBox2 = ""
TextBox7 = ""
TextBox11 = ""
TextBox12 = ""
TextBox13 = ""
End If
End Sub
Private Sub UserForm_Activate()
Dim Zeilenanzahl As Integer
Dim Start As Integer
Dim i As Integer
Dim wb As Workbook
Dim ws1 As Worksheet
Set wb = ActiveWorkbook
Set ws1 = wb.ActiveSheet
Start = 1
Zeilenanzahl = ws1.Cells(Rows.Count, 1).End(xlUp).Row
For i = Start To Zeilenanzahl
UserForm1.ComboBox99.AddItem ws1.Cells(i, 2).Value
Next i
End Sub