Select file dialog box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Ken Getz's API dialog box to allow users to select a file in my
application. I am setting a starting directory and I need to make it so the
user can not change that directory. Is there a way to do that?

Thanks in advance for any help.
 
That is set by default. The documentation about that flag is: " don't
change directories when you're done" whatever that's supposed to mean.

In any case that isn't what I'm looking for. Thanks anyway.
 
I remember having the same problem. I took a side way out: I changed
from using the API dialog box to just populating a listbox with the
specific directory's contents. It's not as pretty, but it sure does
keep the user from browsing!

air code for Form_Load:

Dim strTemp as String
Dim strRowSource as String
Const cstrFolder = "C:\folder\"

strTemp = Dir(cstrFolder, "*.*") 'Change filter if desired.
Do Until strTemp = ""
strRowSource = strRowSource & ";" & strTemp
strTemp = Dir()
Loop

if Left(strRowSource, 1) = ";" then
strRowSource = Mid(strRowSource, 2)
end if

lstFiles.RowSource = strRowSource

HTH,

Kevin
 
What it means is that the current directory won't be changed to whatever
directory you've navigated to.
 
Thanks Kevin that works great!

Kevin K. Sullivan said:
I remember having the same problem. I took a side way out: I changed
from using the API dialog box to just populating a listbox with the
specific directory's contents. It's not as pretty, but it sure does
keep the user from browsing!

air code for Form_Load:

Dim strTemp as String
Dim strRowSource as String
Const cstrFolder = "C:\folder\"

strTemp = Dir(cstrFolder, "*.*") 'Change filter if desired.
Do Until strTemp = ""
strRowSource = strRowSource & ";" & strTemp
strTemp = Dir()
Loop

if Left(strRowSource, 1) = ";" then
strRowSource = Mid(strRowSource, 2)
end if

lstFiles.RowSource = strRowSource

HTH,

Kevin
 
Back
Top