Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set filename when saving a file created from a template 1

Status
Not open for further replies.

PPettit

IS-IT--Management
Sep 13, 2003
511
US
When you're trying to save a file created from a template, is there a way to set the file name that you want to use rather than using the auto-incremented file name?

For example:
I have a template named "MyTemplate.xlst". When the user wants to create a document using this template, the new file is automatically called "MyTemplate1". If I try to save this file, I get a "Save As" dialog box with "MyTemplate1.xlsx" defaulted in the file name field.

I want to save the file using a name based on some fields that the end user will fill in. Is there a way to set the file name to whatever I want when the "Save As" dialog box comes up?
 
Build the desired filename into a string variable and the use the Workbook.SaveAs method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks, PHV. That appears to be just what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top