I am running a timed macro every half hour using this code:
Private Sub Workbook_Open()
MsgBox ("test")
Application.OnTime TimeValue("07:30:00"), "'Test.xlsm'!Daily.Daily"
End sub
This runs fine when I manually call the macro with a button, or I have the sheet active but I sit with multiple sheets open at once, when I am clicked into another sheet the runtime error 9 appears, subscript out of range - I understand this error, but dont know how I can either run it in the background or bring the sheet into the forefront so it isnt out of range
I have tried various online forum suggestions but they seem to be advising how to solve the runtime error due to a different cause than I am facing, im sure its a simple fix but I cant seem to ask google the right question - any suggestions would be great. thank you