0

How to make the current folder that holds the access DB as the default folder when opening FileDialog ? i used "CurrentProject.Path" as shown below but its making c:\ the default

Dim fd As Object
Set fd = Application.FileDialog(3)
Dim vrtSelectedItem As Variant

With fd
.InitialFileName = Environ("CurrentProject.Path") & "\"
.Filters.Clear
.Filters.Add "Microsoft Excel(*.xlsx)", "*.xlsx", 1
.AllowMultiSelect = False
.Show 
End With

thank you

mohamed shubber
  • 113
  • 1
  • 14

1 Answers1

0

i just found out whats wrong,i have to put it like this

.InitialFileName = (CurrentProject.Path)
mohamed shubber
  • 113
  • 1
  • 14