GetSaveAsFilename/GetOpenFilename

F

Fan924

In my macro to save column data to disk, I use "FileName =
Application.GetSaveAsFilename(".
The window comes up and the "File name:" box is blank. If I click on a
file name, it moves over to the "File name:" box. Totally expected.

In my macro to open a file and move data to a worksheet, I use
"FileName = Application.GetOpenFilename(" The window comes up and the
"File name:" box is blank. I click on a file name, and nothing..;( The
box remains blank. Is there a fix for this?
 
J

JLGWhiz

I believe that the GetSaveAsFileName anticipates that the user will change
the file name and therefore sets focus on the name box so that a new name can
be entered. Conversely, the GetOpenFileName anticipates that the user will
click the Open button once a selection is made and therefore does not set
focus to the name box since the selected file is highlighted and focus is set
to the Open button.
 
F

Fan924

Apparently it is not a Visual Basic issue. Excel 97 and all Office 97
programs does this too.
 

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