Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Time event (2002)

    Hi,

    I have the below procedures stored in a module within PERSONAL.xls.

    The SetAlarm procedure does not seem to want to activate the SoundAlarm procedure?

    Sub SetAlarm()
    Application.OnTime TimeValue("11:55:00 am"), "SoundAlarm"
    End Sub
    Sub SoundAlarm()
    Beep
    MsgBox "Meeting"
    End Sub

    Any Idea's?

    Thanks

    Nath

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Time event (2002)

    You won't see anything happen until it's 11:55 AM. I tested your code with a time 1 minute in the future, and the message box was displayed correctly after a minute.

    Don't you have an application with a calendar, such as Outlook? It's easier to set a reminder there.

  3. #3
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time event (2002)

    Hans,

    It's the 'Time event' in theory that I am testing, I would not use it as a reminder, I am just learning the theory of using time to activate a procedure. I have been trying this over and over, using a minute or two in the future, but cannot get it to execute.

    Nath

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Time event (2002)

    Try the attached workbook (make sure that macros are enabled when you open the workbook).
    When you click the button labeled "Click Me", a reminder should be displayed 1 minute later. Does it work?
    Attached Files Attached Files

  5. #5
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time event (2002)

    It does Hans, yes! I shall lookat the code and compare.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •