Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
workbooks.Open Day(Date-1) & ".txt"
testing in the immediate window: ? day(date-1) 17 ? day(DateValue("September 1, 2004")-1) 31 -- Regards, Tom Ogilvy "alexm999 " wrote in message ... 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 easier way for me to run only 1 macro and it will automatically grab the correct previous days file? --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Message posted from http://www.ExcelForum.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
workbooks.open "C:\UDC\" & day(date-1) & ".txt"
cells(day(date-1)+5,1).Activate -- Regards, Tom Ogilvy "alexm999 " wrote in message ... Here's one more... After I run the file TODAY, then when i run it tomorrow, i'd like it to skip to the next row so the first row is not deleted. I'm starting it in Cell A6 and going down 31 cells. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Macro to Open File, Delete Contents, Save New File | Excel Discussion (Misc queries) | |||
Macro to pull data from another file - update name of file | Excel Discussion (Misc queries) | |||
Excel '00, 1st file has macros, how to stop macro in 2nd file? | Excel Discussion (Misc queries) | |||
Macro to insert values from a file and save another sheet as a .txt file | Excel Programming | |||
Automate open file, update links, run macro, close and save file | Excel Programming |