Hello Everyone,
I have two AUTORUN macro's ... one runs every 15 secs and one run every 15 mins. These two are running (auto running) without any conflict and I'm happy but I have a specific need --------- I want these two NOT to run at one particular interval (every Friday from 8:55 AM to 10:15 AM). I have managers meeting during this time and I don't want this sheet get updated (as this will be projected on a big monitor).
Below goes the two autorun macro's ----- can someone please modify such that these two not during that one interval ---- I would really appreciate if someone can dig it. Thanks a lot in advance!!
Sub RunEvery15Mins()
Call Workbook_Open
Application.OnTime Now + TimeValue("00:4:00"), "RunEvery15Mins"
End Sub
Dim VA, VT, Rg As Range
Private Sub Display()
If Rg Is Nothing Or IsEmpty(VA) Then Exit Sub
ActiveWindow.ScrollRow = Rg.Row
Set Rg = Rg.End(xlDown): If IsEmpty(Rg) Then Set Rg = [B3]
VT = Now + VA
Application.OnTime VT, "ThisWorkbook.Display"
End Sub
Sub ScrollStart()
Set Rg = [B3]
VA = 15 / 86400
ActiveWindow.ScrollColumn = 1
Display
End Sub
Sub ScrollStop()
Application.OnTime VT, "ThisWorkbook.Display", , False
Set Rg = Nothing
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Not Rg Is Nothing Then ScrollStop
End Sub
Bookmarks