Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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
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
Save as Template Mike Excel Discussion (Misc queries) 2 March 20th 10 11:49 AM
When you hit Save on a template, how can you save as worksheet? cwgirl1982 Excel Worksheet Functions 1 September 4th 08 11:18 PM
From Template Save As Help Pammi J New Users to Excel 7 January 16th 07 02:49 PM
Open a template, copy 3 worksheets w ranges and save as workbook [email protected] Excel Programming 0 February 3rd 06 05:30 AM
How and where to save template? mom42 Excel Discussion (Misc queries) 3 June 5th 05 02:05 PM


All times are GMT +1. The time now is 02:34 AM.

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

About Us

"It's about Microsoft Excel"