![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: Isle of Man
Posts: 7
|
Hi I was wondering if somebody could help me make a macro so every monday my workbook saves as a seperate file everyweek.
e.g on modnay the 13th feb it saves the file 02/13/02 and the week after it says 02/20/02. Please could somebody help me on this topic, much appreciated thank you. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Try the following code:
Private Sub Workbook_Open() Dim TodayDate As Date TodayDate = Date If WeekdayName(Weekday(TodayDate)) = "Monday" _ Then ThisWorkbook.SaveAs Filename:=Format(TodayDate, "mm_dd_yy") End Sub Put it in the module for your workbook.
__________________
Kind regards, Al Chara |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|