GetSaveAsFilename - how to code the arguments

L

L Mehl

Hello --

I want to use GetSaveAsFilename to prompt the user to select a filename (for
use or easy modification) to pass to SaveCopyAs so the the current Workbook
can be backed up.

This code
strFileIn = Application.GetSaveAsFilename( _
InitialFilename:="*.xls" , _
FileFilter:="Excel Files (*.xls), *.xls ") , _
Title:= con_strMsgTitle & " Save Plot and Data")

results in 'Expected: End of Statement"

I found the FileFilter structure in MSDN, and figured out the
InitialFilename and Title structures. They each work alone, but not
together.

Can someone help me by telling me how to fix the code, or how to simply put
the parameter values in the correct order in parentheses.

Thanks for any help.

L Mehl
 
L

L Mehl

Apologies for posting code which had parenthesis errors.

Thanks to Harald, Nick, and MSDN PSS ID Number: 153722,
the structure that works is:
strFileIn = Application.GetSaveAsFilename( _
InitialFilename:="*.xls" , _
FileFilter:="Microsoft Excel Workbook (*.xls), *.xls" , _
Title:= con_strMsgTitle & " Save Plot and Data")

L Mehl
 

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