This is the modified code to fit your needs.
Code:
Private Sub workbook_Open()
If Sheets("Aux").Range("A1").Value < Date The
Sheets("CSF1").Range("A5:C14, A18:C27, A31:C40, A44:C53, A57, C66") = ClearContents
Sheets("CSF2").Range("A5:C14") = ClearContents
Sheets("CSF3").Range("A5:C14, A18:C27, A31:C40, A44:C53, A57, C66, A70:C79") = ClearContents
Sheets("CSF4").Range("A5:C14, A18:C27, A31:C40, A44:C53") = ClearContents
End If
Sheets("Aux").Range("A1").Value = Date
End Sub
I am trying this and am getting a "compile error: syntax error". I am admittedly not big on VB and am a bit lost. Here is what I'm trying.
Private Sub workbook_Open()
If Sheets("PM Southeast Rotation").Range("AB2").Value < Date
Sheets("Southeast Screening Data").Range("C9:P12,C23,C25,F23:F25,L16:L19,L21:L25,M18,M20,M22,M25,M27,M29,O18:R30,E30:K30,T9:U19,S21,C36:R39,C50,C53,F50:F52,E58:K58,M45,M47,M49,M52,M54,M56,O45:R58,U36:U46,S48,L43:L46,L48:L52") = ClearContents
Sheets("AM Southeast Rotation").Range("A5:D22,E5:E22,F5:F22,H5:I22,K5:M22,O5:T22,V5:X22,Z5:AB22,AD5:AI22,T2,W2,AG2,H36:Y42") = ClearContents
Sheets("PM Southeast Rotation").Range("A5:D22,E5:E22,F5:F22,H5:I22,K5:M22,O5:U22,W5:Y22,AA5:AC22,AE5:AI22,U2,X2,AH2,H36:AA42") = ClearContents
End If
Sheets("PM Southeast Rotation").Range("AB2").Value = Date
End Sub
Thoughts anyone?