How can I set an alarm in Microsoft Excel

B

Binoj

Have prepared a time-schedule table in Excel, and I'd like an Alarm to pop
up, as per this time-schedule
 
J

JMay

Paste this code into a standard module; It's a start for you.
HTH,
JMay

Dim MyMessage

Sub SetAlarm()
Dim temptime As String
Dim rtime As Date
temptime = InputBox("What Time should I Beep at you?")
MyMessage = InputBox("Enter short message")
rtime = TimeValue(temptime)
Application.OnTime rtime, "MBox"
End Sub

Private Sub MBox()
snz = MsgBox("This is your alarm RE: " & vbNewLine & vbNewLine & _
MyMessage & vbNewLine & vbNewLine & " Do you wish to" & _
vbNewLine & "Extend the Alarm time?", vbYesNo)
If snz = vbYes Then tReset = InputBox("Enter new time")
If snz = vbYes Then nrtime = TimeValue(tReset)
Application.OnTime nrtime, "MBox"
If snz = vbNo Then Exit Sub
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top