Habe ein dringliches Problem...
Beim Starten eines UF bekomme ich den Laufzeitfehler 438.
Beim Starten desUF soll eine Listbox befüllt werden, schätze
es liegt daran. Ivh stelle meinen Code mal mi ein.
Danke im Voraus !
Grüße aus Hessen
Dirk
Private Sub Image2_Click()
Unload Me
Load UFPFVHM
UFPFVHM.Show
End Sub
Private Sub listbox2_Change()
If ListBox2.Tag "" Then Exit Sub
T0 = ListBox2.List(ListBox2.ListIndex, 0)
T1 = ListBox2.List(ListBox2.ListIndex, 1)
T2 = ListBox2.List(ListBox2.ListIndex, 2)
T3 = ListBox2.List(ListBox2.ListIndex, 3)
T4 = ListBox2.List(ListBox2.ListIndex, 4)
T5 = ListBox2.List(ListBox2.ListIndex, 5)
T6 = ListBox2.List(ListBox2.ListIndex, 6)
T7 = ListBox2.List(ListBox2.ListIndex, 7)
T8 = ListBox2.List(ListBox2.ListIndex, 8)
T9 = ListBox2.List(ListBox2.ListIndex, 9)
T10 = ListBox2.List(ListBox2.ListIndex, 10)
T11 = ListBox2.List(ListBox2.ListIndex, 11)
T12 = ListBox2.List(ListBox2.ListIndex, 12)
T13 = ListBox2.List(ListBox2.ListIndex, 13)
T14 = ListBox2.List(ListBox2.ListIndex, 14)
T15 = ListBox2.List(ListBox2.ListIndex, 15)
T16 = ListBox2.List(ListBox2.ListIndex, 16)
T17 = ListBox2.List(ListBox2.ListIndex, 17)
T18 = ListBox2.List(ListBox2.ListIndex, 20)
T19 = ListBox2.List(ListBox2.ListIndex, 21)
'T20 = listbox2.List(listbox2.ListIndex, 20)
'T21 = listbox2.List(listbox2.ListIndex, 21)
End Sub
Private Sub UserForm_Initialize()
Application.ScreenUpdating = False 'flackern abschalten
Dim AppExcel As Object
Dim Datei As String
Dim arrWerte As Variant
Datei = ThisWorkbook
ListBox2.ColumnCount = 21
ListBox2.ColumnWidths = "3,5cm;4cm;4,0cm;1cm;1,2cm;4,0cm;4cm;0cm;0cm;0cm;0cm;0cm;0cm;0cm;2, _
_
0cm;2cm;4cm;0cm;2cm;2cm;2cm"
Set AppExcel = GetObject(Datei)
arrWerte = AppExcel.Sheets("Liste").[A2:AD3000]
ListBox2.List = arrWerte
AppExcel.Close False
Set AppExcel = Nothing
Application.ScreenUpdating = True
End Sub