Hi Guys,
Could you help me with the codes below?
What I want to accomplish is for the codes to save back up ONLY ON FRIDAYS but my codes are not working.
Could you help me with the codes below?
What I want to accomplish is for the codes to save back up ONLY ON FRIDAYS but my codes are not working.
Code:
Sub Time_In()
Dim FileName As String
' Keyboard Shortcut: Ctrl+e
'
'On cell and saves file
Sheets("TITO").Select
ActiveCell.Offset(0, 0).Select
ActiveCell.Value = Format(Now(), "HH:MM mm/dd/yyyy")
ActiveCell.NumberFormat = "h:mm AM/PM"
Call Shift 'ignore this in this question
If Weekday(Now(), vbFriday) Then
Application.DisplayAlerts = False
For Each w In Application.Workbooks
w.Save
FileName = ActiveWorkbook.Name
ActiveWorkbook.SaveAs FileName:="\\Pathfile\" & FileName, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
Application.DisplayAlerts = True
w.Close
Next w
End If
End Sub