Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
new template & save on first open
Developing a template for a monthly report. I want when the template is
first used to prompt to save the file using this format "filename - month year" .xls I am able to get month and year, but cannot get the file to save when the template is first used? Know to use Workbook_Open() on the ThisWorkbook module... Any suggestions? Thanks, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
new template & save on first open
Maybe something like:
Option Explicit Private Sub Workbook_Open() If Me.Path = "" Then 'still a template Me.SaveAs Filename:="C:\somepath\somefilename - " _ & Format(Date, "mmm - yyyy") & ".xls", FileFormat:=xlWorkbookNormal End If End Sub Krystal Peters wrote: Developing a template for a monthly report. I want when the template is first used to prompt to save the file using this format "filename - month year" .xls I am able to get month and year, but cannot get the file to save when the template is first used? Know to use Workbook_Open() on the ThisWorkbook module... Any suggestions? Thanks, -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
new template & save on first open
That works! yeah!
"Dave Peterson" wrote: Maybe something like: Option Explicit Private Sub Workbook_Open() If Me.Path = "" Then 'still a template Me.SaveAs Filename:="C:\somepath\somefilename - " _ & Format(Date, "mmm - yyyy") & ".xls", FileFormat:=xlWorkbookNormal End If End Sub Krystal Peters wrote: Developing a template for a monthly report. I want when the template is first used to prompt to save the file using this format "filename - month year" .xls I am able to get month and year, but cannot get the file to save when the template is first used? Know to use Workbook_Open() on the ThisWorkbook module... Any suggestions? Thanks, -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save as Template | Excel Discussion (Misc queries) | |||
When you hit Save on a template, how can you save as worksheet? | Excel Worksheet Functions | |||
From Template Save As Help | New Users to Excel | |||
Open a template, copy 3 worksheets w ranges and save as workbook | Excel Programming | |||
How and where to save template? | Excel Discussion (Misc queries) |