ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   GetSaveAsFilename/GetOpenFilename (https://www.excelbanter.com/excel-programming/420730-getsaveasfilename-getopenfilename.html)

Fan924

GetSaveAsFilename/GetOpenFilename
 
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?

JLGWhiz

GetSaveAsFilename/GetOpenFilename
 
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.

"Fan924" wrote:

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?



All times are GMT +1. The time now is 08:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com