paulmcneil
asked on
Using API GetOpenFile varDirectory parameter
How do pass the varDirectory parameter to the API GetOpenFile function so that the default directory is My computer? Thanks
that might not be possible...
this is close to that
strStartDir = Environ("userProfile") & "\desktop"
this is close to that
strStartDir = Environ("userProfile") & "\desktop"
This my help:
http://www.mvps.org/access/api/api0002.htm
Note the comment:
Stephen Lebans has added functionality to open the browse folder at a specific place.
which leads to:
http://www.lebans.com/callbackbrowser.htm
mx
http://www.mvps.org/access/api/api0002.htm
Note the comment:
Stephen Lebans has added functionality to open the browse folder at a specific place.
which leads to:
http://www.lebans.com/callbackbrowser.htm
mx
Apparently the Lebans code will work - I just tried it - see image:
And his MDB is attached
mx
Capture1.gif
A2KCallBackBrowseVer4.zip
And his MDB is attached
mx
Capture1.gif
A2KCallBackBrowseVer4.zip
yeah, it does but it is not to get a file, will only allow you to select a folder...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So, now you have both ... File Browse opening to a specific Folder (my computer) and Folder Browse.
mx
mx
ASKER
Thanks to you both. However, I'm using Vista Ultimate and the code works without error, but still does not open the dialog at My Computer. Do you think the parameter
"::{20D04FE0-3AEA-1069-A2D 8-08002B30 309D}"
needs adjusting for Vista Ultimate?
"::{20D04FE0-3AEA-1069-A2D
needs adjusting for Vista Ultimate?
Well, I suppose so. Would have been good to mention that up front.
According to this ... it's the same:
http://www.zdnet.com/blog/bott/the-ultimate-god-mode-list-39-secret-windows-7-shortcuts/1615?pg=3
mx
According to this ... it's the same:
http://www.zdnet.com/blog/bott/the-ultimate-god-mode-list-39-secret-windows-7-shortcuts/1615?pg=3
mx
Then again, I'm not sure what that would change.
Here is more info on those Class IDs ... scroll down to "Before we go on, you need to understand what CLSID values are. These folders, like the Control Panel ..."
http://www.mastiland.com/forums/showthread.php?t=3331&mode=linear
You might nose around the Vista Registry and compare notes.
mx
Here is more info on those Class IDs ... scroll down to "Before we go on, you need to understand what CLSID values are. These folders, like the Control Panel ..."
http://www.mastiland.com/forums/showthread.php?t=3331&mode=linear
You might nose around the Vista Registry and compare notes.
mx
Are you absolutely positive it's not working in Vista ?
What folder does it open to ?
mx
What folder does it open to ?
mx
OK ... I just tried this in Windows 7 x64 ... and it in fact does open to 'Computer' ... which is the equivalent of My Computer in XP. So, that tells me it did not change from XP to Vista.
Something else is going on with your system ...
mx
Something else is going on with your system ...
mx
ASKER
DatabaseMx,
It worked on the Windows XP pc where I'm developing, so you get the points! Thanks for the quick replies everybody.
It worked on the Windows XP pc where I'm developing, so you get the points! Thanks for the quick replies everybody.
ASKER
Problem solved
%SystemRoot%\explorer.exe /e,::{20D04FE0-3AEA-1069-A
If that helps ?
mx