Common Dialog box open to current directory

tkendall

New member
Local time
Today, 17:39
Joined
Dec 11, 2008
Messages
2
Hello, First post on these forums.

Google couldn't solve my questions so I'm turning to you, simple though it may be.

The code below is a basic open dialog box and assign the selected file to the ImportFile value. Upon click of the button I want the dialog box to open to the current path the file is located in. The path is easily found with CurrentProject. Path but I've been unable to assign this to the DirectoryList object.


Code:
Private Sub FileList_Click()
    DirectoryList.ShowOpen
    ImportFile.Value = DirectoryList.FileName

End Sub


Thanks for any help..
 
If you use the Intellisense and select .InitDir = CurrentProject.Path

David
 
Thanks for the quick response, must have missed this option..
 

Users who are viewing this thread

Back
Top Bottom