ComboBox Change
21.08.2003 07:25:11
Erich M.
für nachstehenden Code gibts doch bestimmt eine Verkürzung (Auflistung ListBox)? Leider blicke ich da noch nicht so durch:
Private Sub ComboBox12_Change()
Dim m As Integer
Dim LoI As Integer, LoLetzte As Integer
Worksheets(ComboBox12.Text).Activate
ListBox2.Clear
With Worksheets(ComboBox12.Text)
If .[a65536] = "" Then
LoLetzte = .[a65536].End(xlUp).Row
Else
LoLetzte = 65536
End If
ListBox2.ColumnCount = 10
For LoI = 1 To 10
ListBox2.AddItem Format(.Cells(LoI, 1))
ListBox2.List(LoI - 1, 1) = .Cells(LoI, 2)
ListBox2.List(LoI - 1, 2) = .Cells(LoI, 3)
ListBox2.List(LoI - 1, 3) = .Cells(LoI, 4)
ListBox2.List(LoI - 1, 4) = .Cells(LoI, 5)
ListBox2.List(LoI - 1, 5) = .Cells(LoI, 6)
ListBox2.List(LoI - 1, 6) = .Cells(LoI, 7)
ListBox2.List(LoI - 1, 7) = .Cells(LoI, 8)
ListBox2.List(LoI - 1, 8) = .Cells(LoI, 9)
ListBox2.List(LoI - 1, 9) = .Cells(LoI, 10)
Next LoI
End With
End Sub
Code eingefügt mit: Excel Code Jeanie
Besten Dank für eine Hilfe!
mfg
Erich