Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel: how start macro on specific dates

Status
Not open for further replies.

whiteghost

Technical User
Feb 16, 2003
7
HK
Hi,

This is my first post. I have a set of files which are lists of invoice/credit/debit notes. These files get extrememly long and what I would like to be able to do would be to have a macro that will cut and paste any lines which are 1 month old. I would like the macro to run when the files are open on a specific day each month.

Any help would be greatly appreciated
 
You did not specify what version you are using, but since you mention Macro's , I 'assumed' it 97.
Creat a Autoexec macro which check for the current date and compares it to a day of the Month, or any other date criteria you wish.
For the spreadsheet, you will need that macro to chech each entry's date, and any older then the computed time of 30 days to be removed.
But, as a side suggestion, would it not be simpler just to start an fresh spreadsheet every 1st of the Month?
That way, you can keep track of past Months and keep them on backup for later analysing or so. If the answer is here, mark it, others can benefit from it too.
Free Tip: The F1 Key does NOT destroy your PC!
 
starting a new sheet every month would be the ideal solution, but the 36 users prefer one sheet option.

I have most of the macro written already, but my problem is making it autoexec. My limited knowledge fails me there
 
Just name it .. yes ... AutoExec If the answer is here, mark it, others can benefit from it too.
Free Tip: The F1 Key does NOT destroy your PC!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top