Macro File Help

A

alexm999

I run a macro that opens up a file that is named for the Previous date
For example, today is Aug 18, 2004 so the file I open will be 17.txt

I have 31 Macro's - 1 each for the day of the week. Is there an easie
way for me to run only 1 macro and it will automatically grab th
correct previous days file
 
T

Tom Ogilvy

workbooks.Open Day(Date-1) & ".txt"

testing in the immediate window:

? day(date-1)
17
? day(DateValue("September 1, 2004")-1)
31
 
A

alexm999

Thanks for the quick reply. Here's another question regarding thi
matter.

If the file is in the C:\UDC directory, how will I call this using th
function, i'm having difficulties
 
A

alexm999

Here's one more...

After I run the file TODAY, then when i run it tomorrow, i'd like it t
skip to the next row so the first row is not deleted.

I'm starting it in Cell A6 and going down 31 cells
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top