display messagebox on time

deanop2

New Member
Joined
Jan 29, 2021
Messages
19
Office Version
  1. 2013
Platform
  1. Windows
I'm trying to get a messagebox to open and display a message, I found this code below but it doesn't work
I've tried putting the Private Sub in the workbook and the Sub Display Alarm() in a module but nothing happens.


Private Sub Workbook_Open()
Application.OnTime TimeValue("17:24:00"), "DisplayAlarm()"
End Sub

Sub DisplayAlarm()
MsgBox "Good Morning"
End Sub
 
You are welcome.
Glad you have it working now.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,216,128
Messages
6,129,035
Members
449,482
Latest member
al mugheen

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