You can use the code at
http://www.cpearson.com/Excel/SpecialFolders.aspx to
get the name of the current user's My Document folder (actual name and
location varies by locale and operating system version). One you have that,
you can use ChDrive and ChDir to set the default directory to that folder
and then call GetOpenFileName.
Dim MyDocsFolderName As String
Dim SaveDir As String
Dim FName As Variant
SaveDir = CurDir
' GetSpecialFolder at
http://www.cpearson.com/Excel/SpecialFolders.aspx
MyDocsFolderName = GetSpecialFolder(CSIDL_PERSONAL)
ChDrive MyDocsFolderName
ChDir MyDocsFolderName
FName = Application.GetOpenFilename()
ChDrive SaveDir
ChDir SaveDir
--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
"Steven" <(E-Mail Removed)> wrote in message
news:A0370F2F-2C5B-44AD-B2C3-(E-Mail Removed)...
> How do I create a macro to do a File Open and default to the 'My
> Documents'
> dialog box?
>
> Thank you,
>
> Steven