Excel 07 Xp/Win7 - Application.GetSaveAsFilename

Seanzies

Board Regular
Joined
Nov 19, 2005
Messages
212
In Windows XP PRO, Excel 2007 Pro

This line of code performs correctly:

SelectedFileName = Application.GetSaveAsFilename(ORDERS_FOLDER & fname, Title:="Save eWorkBook")


In Windows 7, Excel 2007

This same line of code does not populate the Dialog filename

SelectedFileName = Application.GetSaveAsFilename(ORDERS_FOLDER & fname, Title:="Save eWorkBook")

What do I need to change?
Also one curveball, is that this code needs to be able to work on Windows XP and Windows7.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
a suggestion, as when trying your code the addittion of the file extension seems to cause the problem for me (Win7, Office 2010):
try specifying the file type in the GetSaveAs by using
fileFilter:="Excel Files (*.xls), *.xls",
eg: SelectedFileName = Application.GetSaveAsFilename(ORDERS_FOLDER & fname, fileFilter:="Excel Files (*.xls), *.xls", Title:="Save eWorkBook")

You won't want to include the extension in your fname

Sorry, but I wasn't able to test in other environments.

HTH
 
Upvote 0
In each of those environments, what is the value in SelectedFileName when you come out of the dialog box?
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,876
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top