MattBaldry
Self Taught, Learn from the Forums
- Local time
- Today, 04:47
- Joined
- Feb 5, 2019
- Messages
- 330
Hi all,
I have the below code to select a file and save the location to a table.
How do I set the folder to dialog opens to so people cannot browse to the wrong folder?
At the moment it opens in the last used folder.
~Matt
I have the below code to select a file and save the location to a table.
Code:
Dim f As Object
Dim strDocumentFileName As String
Dim varItem As Variant
Set f = Application.FileDialog(3)
f.AllowMultiSelect = False
If f.Show Then
For Each varItem In f.SelectedItems
strDocumentFileName = Dir(varItem)
Me.txtDrawingFile = strDocumentFileName
Next
End If
Set f = Nothing
How do I set the folder to dialog opens to so people cannot browse to the wrong folder?
At the moment it opens in the last used folder.
~Matt