habe eine Combobox die will ich bei Click mit den Daten aus Kundentabelle laden, das funktioniert mir aber nur wenn ich es über einen Commandbutton-Click mache, wieso geht es nicht wie unten beschrieben?
Gruss Andreas
Private Sub Combobox1_Click()
Dim curRow As Integer
Dim lastrow As Integer
Dim ws As Worksheet
Set ws = Worksheets("Kunden")
lastrow = ws.Cells.SpecialCells(xlCellTypeLastCell).Row
combobox1.Clear
For curRow = 1 To lastrow
If Len(ws.Range("A" & curRow).Text & "") > 0 Then
combobox1.AddItem ws.Range("A" & curRow).Text
End If
Next
Set ws = Nothing
End Sub