no matter what day I call the function on.
I know I could write a select case weekday(now) statement, was just wondering if there was a neater way to go?
Does this help get you started? I just gave it a quick test and seemed to work ok.
Private Sub LastFriday()
Dim iWeekday As Integer, LastFridayDate As Date
iWeekday = Weekday(Now(), vbFriday)
LastFridayDate = Format(Now - (iWeekday - 1), "dd-mmm-yy")
End Sub
DateAdd("d", -1 - Weekday(Now), Now)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With