Hi Jeff
Sub MakePevMonday()
Dim D As Date
D = Date - Weekday(Date, vbMonday) - 6
Sheets("SamB").Range("StartDay").Value = D
End Sub
HTH. Best wishes Harald
"Jeff" skrev i melding
...
This code gets me the 1st day of the current workweek. I need to edit it
to
get the 1st day of the previous workweek.
Sub Auto_Open()
' Enter the prior Monday
Set StartDay = Sheets("SamB").Range("StartDay")
StartDay.Value = Date
Do Until Weekday(StartDay) = 2
StartDay.Value = StartDay.Value - 1
Loop
End Sub
I would appreciate your help.
Thanks,
Jeff
|