Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Any way to set the Default Filename for a new document?
I have an Excel Template (XLT) I've created. When the user creates a new file
from the template, it asks for certain information and fills those in on the form automatically. When the user goes to save, I'd like to have the default filename given in the Save As dialog box be something like "Price Quotation - [Company Name Here].xls". Right now, when you go to save, it is the same name as the XLT plus a "1" at the end.... Anyway to set this in VBA? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Any way to set the Default Filename for a new document?
Hello Tim
Public Function mySaveAs() Dim varName Dim strDefault strDefault = "Price Quotation - [Company Name Here]" With ActiveWorkbook If Not .Saved Then varName = .Application.GetSaveAsFilename(strDefault, "Microsoft Excel (*.xls),*.xls", , "Overwrite only Company") If varName = False Then Exit Function End If End If End With mySaveAs = varName MsgBox varName End Function Heiko :-) "Tim" wrote: I have an Excel Template (XLT) I've created. When the user creates a new file from the template, it asks for certain information and fills those in on the form automatically. When the user goes to save, I'd like to have the default filename given in the Save As dialog box be something like "Price Quotation - [Company Name Here].xls". Right now, when you go to save, it is the same name as the XLT plus a "1" at the end.... Anyway to set this in VBA? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Any way to set the Default Filename for a new document?
Add a reference to the Common Controls library and use the
Save As function. You can set everything about the dialog box, including the default file name, file name filters, and default target directory. David Gray P6 Consulting http://www.p6c.com/ You are more important than any technology we may employ. -----Original Message----- When the user goes to save, I'd like to have the default filename given in the Save As dialog box be something like "Price Quotation - [Company Name Here].xls". Right now, when you go to save, it is the same name as the XLT plus a "1" at the end.... Anyway to set this in VBA? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I Hyperlink to document using filename in cell? | Excel Worksheet Functions | |||
Is there a way to default the number times a document prints? | Excel Discussion (Misc queries) | |||
How do I revise default document properties information? | Setting up and Configuration of Excel | |||
Turn off default filename "Copy Of" when resaving a file | Setting up and Configuration of Excel | |||
default blank excel document?? | Setting up and Configuration of Excel |