Dan
Thanks for the recent tutorial "Automatically Run a Macro at a Certain Time: Run a Macro at 4:30PM every day". Very useful.
I think that macro only works if the workbook remains open. Therefore I've added a Close macro (also to VBA's ThisWorkbook) to prevent it being closed accidentally. Ny simple coode is as follows (apologies for not declaring the variable!):
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'
'Warn user that there's a timed macro running
r = MsgBox("Want to close workbook '" & Me.Name & "' (and prevent the timed macro(s) from running)?", vbYesNo)
If r = vbNo Then Cancel = True
End Sub
Might that be useful for other less-experienced coders?
John