this vba code is not working: Dim dailyChecksSheet As Worksheet Set dailyChecksSheet =…
Jump to turn (7)
- User
this vba code is not working: Dim dailyChecksSheet As Worksheet Set dailyChecksSheet = ThisWorkbook.Worksheets("Daily Checks") Dim todayDate As Date Dim cellDate As Date todayDate = Date cellDate = dailyChecksSheet.Range("AF1").Value If Weekday(cellDate, vbMonday) >= vbMonday And Weekday(cellDate, vbMonday) <= vbFriday Then If cellDate < todayDate Then MsgBox "Last Week's Dates have already been cleared", vbExclamation Exit Sub End If End If
- Assistant
It looks like there might be a syntax error in your code. You should separate the initialization and assignment of variables. Here is the corrected code:
vba