How can i change the default folder in the FilePicker OR FileOpen Dialog Box?
Currently i'm using the following code to open it but it always opens with the desktop....
Currently i'm using the following code to open it but it always opens with the desktop....
Code:
fileopen = True
Dim dlgopen As FileDialog
Set dlgopen = Application.FileDialog(msoFileDialogOpen)
Do
With dlgopen
.AllowMultiSelect = False
.Title = "Select File to Import"
.Filters.Clear
.Filters.Add "Excel Files", "*.xls", 1
If .Show = -1 Then
For Each fpath In .SelectedItems
importpath = fpath
Next fpath
Else
choice = MsgBox("You have not selected a file." & vbCrLf & vbCrLf & "Quit Application?", vbYesNo, "File not selected")
If choice = vbYes Then
DoCmd.Quit
End If
fileopen = False
End If
End With
Loop While fileopen = False
Set dlgopen = Nothing