The macro may not be available in this workbook or all macros may be disabled.

micfly

Well-known Member
Joined
Sep 8, 2008
Messages
543
I have this code placed in the ThisWorkbook:
Code:
Private Sub TimedMacro()
     
     'This should be the macro that runs; we simply show a message box
    MsgBox "Are you finished with the Sales Log? If so, please close it.", vbInformation
     
End Sub
Code:
Private Sub Workbook_Open()
'TimeSerial(hours, minutes, seconds)
    Application.OnTime Now + TimeSerial(0, 1, 0), "TimedMacro"
End Sub


What's worng with this? When the timed period arrives I get "Cannot run the macro "C:\Users\me\Desktop\SalesLog.xls'!TimedMacro'. The macro may not be available in this workbook or all macros may be disabled." instead of it showing the MsgBox??? Macros ARE enabled in the work book.

Or if there is a better way to do this. I just want a nag reminder to pop up every five minutes. Thanks for any help.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try putting the

Code:
Private Sub TimedMacro()
     
     'This should be the macro that runs; we simply show a message box
    MsgBox "Are you finished with the Sales Log? If so, please close it.", vbInformation
     
End Sub

In its own module.
 
Upvote 0

Forum statistics

Threads
1,214,825
Messages
6,121,787
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top