File Save Sequencing: Foo1.xls, Foo2.xls...

A

AH·C

Does XL have a built-in method that I could tap into to autosequence my
filenames when saving?

I have a template that uses a couple parameters to come up with a
filename, ie Job# JobType.xls. Since several files with the same Job#
& JobType in a day is not uncommon, simply adding a date string won't
work. What I've been doing is manually adding an increment number, ie
Job# JobType1.xls, Job# JobType2.xls

I need to come up with a macro during FileSave to count every file in a
directory that matches the new intended file and append that count to
the end of the new file name.

TIA

Andy
 
P

Paul B

Andy, how about adding a data and TIME to the file name, something like

ActiveWorkbook.SaveAs Filename:="Your Parameters Here" & Format(Now,
"mm-dd-yyyy-hh-mm") & ".xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
A

AH·C

Paul, I do use the DATE technique on other files, particularly on my
personal work records & timeshetts etc.

However, this project is a template used by 10 inspectors daily, but
after a few days, the typical Job# gets closed, while some may stay
open up to 1/2 year. On average, we'll have about 100 active job
orders.

Hmmm, thinking about the pros/cons of the end result... in terms of
backup, 'paper-trail' and saving to network server, etc... yes, I will
go with "yymmddhhmm" (no sorting issues).

Certainly eliminates the issue of me manually renaming & uploading the
files after the net goes down for whatever reason or when an inspector
comes back in wireless range.

Thanks for the thot stimulation, your suggestion is indeed a TIME
saver. ;)

Andy
 
P

Paul B

Your welcome

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
Top