View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
JanetJek JanetJek is offline
external usenet poster
 
Posts: 2
Default GetSaveAsFilename - file name is blank

Thanks Rick and Ron, you saved my day.
And I'll certainly use FileFilter from now on!

"Rick Rothstein (MVP - VB)" wrote:

And, of course, it makes good sense to **always** use FileFilter (OP please
take note)... I am not sure why Microsoft decided to change
GetSaveAsFilename in XL2007 making the display of InitialFile contingent on
its use though.

Rick


"Ron de Bruin" wrote in message
...
Hi Rick

Ok, i never used it without filefilter

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Rick Rothstein (MVP - VB)" wrote in
message ...
Remove the fileFilter argument and you will see what the OP is writing
about... apparently XL2007 changed something as XL2003 works fine with
just the InitialFile argument.

Rick


"Ron de Bruin" wrote in message
...
Hi Janet

This is working for me in Vista/O2007

Dim fname As Variant
fname = Application.GetSaveAsFilename(InitialFileName:="te st.xlsm", _
fileFilter:="Excel Files
(*.xlsm), *.xlsm")


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"JanetJek" wrote in message
...
I have an Excel macro that prompts the user for the file name with
GetSaveAsFilename. It works fine under Window XP (Excel 2000, 2003,
2007) but with Excel 2007 and Vista, the file name in the prompt box is
empty, blank. There is no file name.

Any suggestions?