Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default GetSaveAsFilename - how to code the arguments

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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.591 / Virus Database: 374 - Release Date: 2/18/2004


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default GetSaveAsFilename - how to code the arguments

L,
I'd suggest you count the barckets.
NickHK

"L Mehl" wrote in message
...
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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.591 / Virus Database: 374 - Release Date: 2/18/2004




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default GetSaveAsFilename - how to code the arguments

Hi L

Replace
*.xls ")
with
*.xls)"

--
HTH. Best wishes Harald
Followup to newsgroup only please

"L Mehl" skrev i melding
...
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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.591 / Virus Database: 374 - Release Date: 2/18/2004




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default GetSaveAsFilename - how to code the arguments

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


"L Mehl" wrote in message
...
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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.591 / Virus Database: 374 - Release Date: 2/18/2004




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.591 / Virus Database: 374 - Release Date: 2/17/2004


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with getsaveasfilename Jo Excel Discussion (Misc queries) 2 June 5th 07 12:41 AM
GetSaveAsFilename method Donna Brooks Excel Programming 6 January 27th 04 10:37 PM
GetSaveAsFilename Anand Attavane Excel Programming 2 October 22nd 03 01:21 AM
GetSaveAsFileName Not Working Dan Gesshel Excel Programming 1 September 25th 03 03:28 AM
Excel 2002 GetSaveAsFileName Kevin May Excel Programming 1 September 23rd 03 03:33 AM


All times are GMT +1. The time now is 09:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"