Hallo,
ich versuche gerade in einer listbox ein kompletten ordner inhalt anzuzeigen.
sprich das in der Listbox alle datein namen stehen die in ein bestimmten ordner sind.
noch besser wär wenn er nur nach bildern sucht und man diese über ein scrallbalken durchblättern könnte
Dim sTxt As String, sText As String, sPath As String
sPath = ActiveWorkbook.Path & "\KFZ\" & ComboBox1 & "\" & ComboBox2 & "\" & ComboBox3 & "\" & ComboBox3 & ".txt"
If Dir(sPath) = "" Then
Beep
MsgBox "Leider keine " & ComboBox3 & " Für " & ComboBox1 & " " & ComboBox2 & " verfügbar"
Exit Sub
End If
Close
Open sPath For Input As #1
Do Until EOF(1)
Line Input #1, sTxt
sText = sText & sTxt & vbLf
Loop
Close
sText = Left(sText, Len(sText) - 1)
TextBox1 = sText
Image1.Picture = LoadPicture(ActiveWorkbook.Path & "\KFZ\" & ComboBox1 & "\" & ComboBox2 & "\" & ComboBox3 & "\" & ComboBox3 & ".jpg")
soweit bin ich jetz
jetz sucht er aber nur eine bestimmte datei.. würde aber gern alle im ordner sehen oder mit ein balken durch blättern können
hat da einer eine idee??
danke schon mal