Hi again,
I have another issue that I cannot seem to find the answer to, maybe it's because I do not know how to phrase it correctly :banghead:.
I will try and explain it here..
What I want to do is... open a file dialog from VBA "This of cause is no problem"
the file dialog is opened from a double click function of a textbox holding a link to a picture, what i want to happen is... when the explorer opens I want it to show only the picture that was linked in the textbox.
Example "C:\mark\Photos\Picture 085.jpg"
the code i have so far is as follows...
it opens in the correct folder but it shows all the pictures in that folder.
Thank you in advance of any answer.
I have another issue that I cannot seem to find the answer to, maybe it's because I do not know how to phrase it correctly :banghead:.
I will try and explain it here..
What I want to do is... open a file dialog from VBA "This of cause is no problem"
the file dialog is opened from a double click function of a textbox holding a link to a picture, what i want to happen is... when the explorer opens I want it to show only the picture that was linked in the textbox.
Example "C:\mark\Photos\Picture 085.jpg"
the code i have so far is as follows...
Code:
Private Sub FilePathLbl_DblClick(Cancel As Integer)
Dim fFile As String
Dim fd As Office.FileDialog
Dim retVal As Variant
Set fd = Application.FileDialog(MsoFileDialogType.msoFileDialogFilePicker)
With fd
fd.AllowMultiSelect = False
fd.InitialFileName = Forms!Addpics!FilePathLbl
fd.Filters.Clear
fd.Filters.Add "Pictures", "*.jpg",1
If .Show = True Then
fFile = fd.InitialFileName
retVal.Select = shell("explorer.exe " & fFile)
Else
Exit Sub
End If
End With
Set fd = Nothing
End Sub
it opens in the correct folder but it shows all the pictures in that folder.
Thank you in advance of any answer.