I have a macro, that works, that I want to run on a certain day at a
certain time, but can't find a way to trigger it.
Tried
Application.OnTime
I have a Class Module with
Public WithEvents xlApp As Application
Private Sub Class_Initialize
Set XL.xlApp = Application
Module
Application.OnTime(9:00 AM),"Date_Lock", , = True
Sub Date_Lock()
ActiveSheet.Select
Range("C3:W384").Select
Range("C349").Activate
Selection.Locked = True
Selection.FormulaHidden = True
ActiveWorkbook.Save
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
ActiveSheet.EnableSelection = xlNoSelection
End Sub
Date _Lock works when manually run, but won't trigger when I want?
Bookmarks