AW: Userform Combobox
03.06.2009 12:32:04
tursiops
Ähm...
Das ging daneben...
Es ging darum Deinen Codeabschnitt für die Combobox einzubauen:
.............................................
Dim iRow As Integer
For iRow = 1 To WorksheetFunction.CountA(Columns(1))
If Cells(iRow, 1).Locked = False Then
ComboBox4.AddItem Cells(iRow, 1).Value
End If
Next iRow
...................................
Private Sub UserForm_Initialize()
Dim lZeile As Long
Dim iRow As Integer
Sheets("B & A").Select
With ComboBox4
.ColumnCount = 3
.ColumnWidths = "3 cm; 3 cm; 1 cm"
For lZeile = 4 To Range("BZ94").End(xlUp).Row
.AddItem Cells(lZeile, 78).Text
.List(.ListCount - 1, 1) = Cells(lZeile, 79).Text
.List(.ListCount - 1, 2) = Cells(lZeile, 80).Text
Next lZeile
If .ListCount > 0 Then ComboBox7.List = ComboBox4.List
End With
End Sub
Der zuvor von mir eingestellte Code an sich funktioniert, Ist nur sehr gekürzt. Es fehlt halt nur der Filter für die Combobox, damit gesperrte Zellen nicht in der Liste aufgeführt werden.
Gruß tursiops