View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default GetOpenFilename with default filename?

You need to use chdrive and chdir before calling the getopenfilename.

chdrive("h:")
chdir("temp")

"Gustaf" wrote:

I'm trying to adopt the Application.GetOpenFilename method, so I can let go of the dependency for comdlg32.ocx, which is not included in Vista. However, I haven't found a way to have GetOpenFilename start with a default filename. Starting in a given directory works (if I call it before calling GetOpenFilename), but I wonder if it's possible to have the dialog box open with a default filename in that directory? That is, when the dialog opens (in the given directory), the default file should be pre-selected. Is that possible?

Gustaf