Alexander K
New Member
- Joined
- Oct 13, 2014
- Messages
- 16
Hi
I have written a VBA code that backups the excel worksheet on the 3rd monday of the month but it doesnt work and i doing something wrong.
Can anyone help
I have written a VBA code that backups the excel worksheet on the 3rd monday of the month but it doesnt work and i doing something wrong.
Code:
Private Sub Workbook_Open()
'Backup
If TODAY() = (TODAY() - Day(TODAY()) + 32 - Weekday(TODAY() - Day(TODAY()) - 1)) Then
ChDir _
"L:\LOG20 Spares Planning\Van Stocks Control\Van Stock Profiles\Generic Regional Profiles\Profile Backups"
ActiveWorkbook.SaveAs Filename:= _
"L:\LOG20 Spares Planning\Van Stocks Control\Van Stock Profiles\Generic Regional Profiles\Profile Backups\300 STYLE GRP PROFILES B1.xlsm" _
, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=True
Else
End If
End Sub
Can anyone help