Insert a standard module (menu>insert>module). It should contain this:
Code:
Option Explicit
Public alertTime As Variant
Public Sub EventMacro()
MsgBox "test"
SetOnTime
End Sub
Sub SetOnTime()
alertTime = Now + TimeSerial(0, 0, 10)
Application.OnTime alertTime, "eventmacro"
End Sub
If you want workbook open event to trigger the code it should contain this:
Code:
Private Sub Workbook_Open()
Dim alertTime As Double
alertTime = Time + TimeSerial(0, 0, 10) 'this adds 10 sec. to time workbook opens for first run
Application.OnTime alertTime, "EventMacro"
End Sub
A msgbox should open 10 secs after workbook open, then every 10 seconds. If you can get that to work then the next steps can be figured out.
Note: you can do all the pasting, then paste this into the immediate window
Application.OnTime alerttime, "eventmacro", , False
You can then trigger the wb open even by putting your cursor at the beginning of the open event code and pressing F5. You should get the msgbox 10 seconds later.
When you want to stop the event, put cursor at the end of that line in the immediate window and hit Enter.
OR you can change the value from 10 secs to some other value if you want more time in between.
EDIT - your file must be xlsm. Next time, please upload xlsm when you want code, because xls files cannot contain vba (macros).