ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   File Save Sequencing: Foo1.xls, Foo2.xls... (https://www.excelbanter.com/excel-discussion-misc-queries/57475-file-save-sequencing-foo1-xls-foo2-xls.html)

AH·C

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

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


--
AH·C
------------------------------------------------------------------------
AH·C's Profile: http://www.excelforum.com/member.php...o&userid=29108
View this thread: http://www.excelforum.com/showthread...hreadid=488537


Paul B

File Save Sequencing: Foo1.xls, Foo2.xls...
 
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

"AH·C" wrote in message
...

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


--
AH·C
------------------------------------------------------------------------
AH·C's Profile:

http://www.excelforum.com/member.php...o&userid=29108
View this thread: http://www.excelforum.com/showthread...hreadid=488537




AH·C

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

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


--
AH·C
------------------------------------------------------------------------
AH·C's Profile: http://www.excelforum.com/member.php...o&userid=29108
View this thread: http://www.excelforum.com/showthread...hreadid=488537


Paul B

File Save Sequencing: Foo1.xls, Foo2.xls...
 
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

"AH·C" wrote in message
...

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


--
AH·C
------------------------------------------------------------------------
AH·C's Profile:

http://www.excelforum.com/member.php...o&userid=29108
View this thread: http://www.excelforum.com/showthread...hreadid=488537





All times are GMT +1. The time now is 06:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com