Rabu, 22 Februari 2012

Re: [ExcelVBA] 2010 Crash

 


PMJI...

This may be off base but....

You may want to have a look at a save routine I wrote some time ago. It's part of a download from the codecage web site. It's an application independent backup that increments a number at the end of the filename. It looks in a folder and picks up all the files with the same root name as the current one and checks the numbers on the end. It adds one to the highest and does a save as. Then it does a save as with the root file name so the latest is always the same name so you can shortcut to it, but there is an extra copy with an incremented number saved where you want. It will optionally make an entry in a database as well.

It's part of a large add in that is sticky on the codecage, but if you like I can chop it out and post it in the files section for download.

Let me know if you want more info. As I said, I wanted it to be application independent so it's possible to use in word/excel and so on.

HTH
Lisa

Sent: Wed, Feb 22, 2012 4:52 am
Subject: RE: [ExcelVBA] 2010 Crash

Really clever, Adrian.

A good refinement would be as follows:
1. Having now saved as a new filename, the old filename must be
sed again to save with else you lose that. So repeat your save-as code
ut this time without the random number addition. Or does your
aveCopyAs already account for that?
2. How about making it a sequential number instead of random? You
an have the code
a. Remember the last number used and increment by one
b. Find the number using FIND("EDR/",filename) to get position, add
, and use MID(result, length of random string) and increment by 1.
c. Use an inputbox after your messagebox to have the user enter a
-digit text value, e.g."0001" and use that as the number.

Regards


Paul

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar