benötige eine Code Hilfe. Soweit funktioniert das ganze auch.
Wenn ich SpinButton betätige zeigt er mir die Bilder an die im Laufwerk abgelegt sind,
würde aber gerne auch nach einem Bild im Laufwerk suchen können,
wenn ich den Pfad eingebe er mir sozusagen auch das Bild anzeigt.
Bin für jede Hilfe Dankbar.
Folgender Code:
Option Explicit
Dim arrFotos
Private Sub SpinButton1_Change()
Image1.Picture = LoadPicture(arrFotos(SpinButton1))
Label1 = SpinButton1 + 1
TextBox1 = arrFotos(SpinButton1)
CheckBox1.Value = False
Repaint
End Sub
Private Sub UserForm_Activate()
Dim oFotos As Object, sFile As String
Set oFotos = CreateObject("Scripting.Dictionary")
Const Verz As String = "C:\Test\"
sFile = Dir(Verz & "*.jpg")
Do While sFile ""
oFotos(Verz & sFile) = 0
sFile = Dir
Loop
arrFotos = oFotos.keys
SpinButton1.Max = oFotos.Count - 1
TextBox1 = arrFotos(0)
Image1.Picture = LoadPicture(arrFotos(0))
Label1 = "1"
Label6 = oFotos.Count
TextBox5.Text = Format(Date, "dd.mm.yyyy")
TextBox6.Text = Format(Now, "hh:mm")
End Sub
Lieben Gruß
Amina