Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default How To Create a Document in Excel from a Template, Using a Macro

Zach,
That is the way that templates work.
To increment the name each time, you would have to store the last number
used somewhere (in the work book creating the new file from the template),
then rename (SaveAs) the new file with "Job" & Format(LastNumber+1,0000),
then update the value of LastNumber ready for next time.

NickHK

"Z Nicodemous" <Z wrote in message
...
Hi There,

Well its not QUITE as simple as the subject.....

What i want to do is the following:

I have a template called "Job000"

I created a macro which automatically creates a new document from the
template.

When i run the macro, its creates a document called "Job0001"

When i run the macro again, it again creates a document called "Job0001"

What i want to happen is for it to automatically generate a different
filename each time, specially "Job0002" - "Job0003" - "Job0004" - so on

and
so forth.

I can not figure out how to do this, so i am hoping someone can help me.

Many Regards
Zach Nicodemous



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
create a template document, which when used will automate a number gigglygover Excel Discussion (Misc queries) 2 October 24th 08 11:21 AM
How to create a formatted 'readable' document based on Excel document? [email protected] Excel Discussion (Misc queries) 0 June 23rd 06 06:09 PM
How to open xl and create a new document based on a template Colin Wilson Excel Discussion (Misc queries) 2 December 2nd 05 01:07 PM
I want to create a template like invoice template in excel. Rahul Gupta[_2_] Excel Programming 7 May 12th 05 02:50 AM
Macro in template opens last saved document smoenra Excel Programming 2 July 1st 04 01:56 PM


All times are GMT +1. The time now is 02:07 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"