Setting CurDir with a Windows File Open dialog box

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

How can CurDir be set by using a regualar Windows Open dialog box?

For file selection I'm using the File Open dialog code from:
http://www.mvps.org/access/api/api0001.htm, but this only allows selection of
files.

I want a dialog box for the user to select a folder and use the result to
set CurDir.
After that I populate a listbox with:

Dim StuffToFind, FoundStuff As String
StuffToFind = CurDir & "\*.cls"
FoundStuff = Dir(StuffToFind)
Do While FoundStuff <> ""
List1.AddItem (FoundStuff)
FoundStuff = Dir
Loop

How can I set CurDir with a dialog box?
 
Back
Top