Browse for folder

P

paradigm

I want to use the Browse for folder but I would like it to start in a
specified folder. Whenever I use it it starts in the root folder.
Alec
 
J

Jeanette Cunningham

Alec,
If you are using the api from the access web called api 0001, then the
following will allow you to tell the dialog where to open

When you call this function in your code, use the code below.
' Now actually call to get the file name.
varFileName = ahtCommonFileOpenSave( _
OpenFile:=True, _
InitialDir:=varDirectory, _
Filter:=strFilter, _
Flags:=lngFlags, _
DialogTitle:=varTitleForDialog)
If Not IsNull(varFileName) Then
varFileName = TrimNull(varFileName)
End If
GetOpenFile = varFileName


On the line
InitialDir:=varDirectory, _
you can use (example)
InitialDir:="c:\documents and settings\all users\desktop", _

replace "c:\documents and settings\all users\desktop" with the path and
folder where you want it to open

Jeanette Cunningham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top