+ Reply to Thread
Results 1 to 5 of 5

Alarm Clock?

  1. #1
    Rodney
    Guest

    Alarm Clock?


    I need to be called to my computer at differing
    times during the day. (approx 15-20)

    I have been using "Karen's Alarm Clock" but this
    only allows 5 settings.

    Can Excel be programmed to suit?

    Thanks




  2. #2
    Bernie Deitrick
    Guest

    Re: Alarm Clock?

    Rodney,

    Copy the code below and paste it into a codemodule in a new workbook. Change
    the path and filename in this line to the file that you want to play:

    WAVFile = "C:\Sound Files\Trumpet1.wav"

    Enter dates and times starting in cell A1, and going down the column (as
    many as you want), in the format

    5/12/2005 10:15:00 AM

    Then run SetAlarms.

    HTH,
    Bernie
    MS Excel MVP


    Private Declare Function PlaySound Lib "winmm.dll" _
    Alias "PlaySoundA" (ByVal lpszName As String, _
    ByVal hModule As Long, ByVal dwFlags As Long) As Long

    Const SND_SYNC = &H0
    Const SND_ASYNC = &H1
    Const SND_FILENAME = &H20000

    Sub PlayWAV()
    WAVFile = "C:\Program Files\Ahead\Nero\Trumpet1"
    Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
    End Sub

    Sub SetAlarms()
    Application.Calculate
    Dim myCell As Range
    For Each myCell In Range("A1", Range("A65536").End(xlUp))
    Application.OnTime myCell.Value, "PlayWAV"
    Next myCell
    End Sub

    Sub CancelAlarms()
    Dim myCell As Range
    For Each myCell In Range("A1", Range("A65536").End(xlUp))
    Application.OnTime myCell.Value, "PlayWAV", , False
    Next myCell
    End Sub



    "Rodney" <[email protected]> wrote in message
    news:%[email protected]...
    >
    > I need to be called to my computer at differing
    > times during the day. (approx 15-20)
    >
    > I have been using "Karen's Alarm Clock" but this
    > only allows 5 settings.
    >
    > Can Excel be programmed to suit?
    >
    > Thanks
    >
    >
    >




  3. #3
    Bernie Deitrick
    Guest

    Re: Alarm Clock?

    Ooops, I used two different paths (meant to change the code before sending).
    So, change the line

    WAVFile = "C:\Program Files\Ahead\Nero\Trumpet1"

    to reflect your wav file location.

    HTH,
    Bernie
    MS Excel MVP


    "Bernie Deitrick" <deitbe @ consumer dot org> wrote in message
    news:[email protected]...
    > Rodney,
    >
    > Copy the code below and paste it into a codemodule in a new workbook.

    Change
    > the path and filename in this line to the file that you want to play:
    >
    > WAVFile = "C:\Sound Files\Trumpet1.wav"
    >
    > Enter dates and times starting in cell A1, and going down the column (as
    > many as you want), in the format
    >
    > 5/12/2005 10:15:00 AM
    >
    > Then run SetAlarms.
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > Private Declare Function PlaySound Lib "winmm.dll" _
    > Alias "PlaySoundA" (ByVal lpszName As String, _
    > ByVal hModule As Long, ByVal dwFlags As Long) As Long
    >
    > Const SND_SYNC = &H0
    > Const SND_ASYNC = &H1
    > Const SND_FILENAME = &H20000
    >
    > Sub PlayWAV()
    > WAVFile = "C:\Program Files\Ahead\Nero\Trumpet1"
    > Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
    > End Sub
    >
    > Sub SetAlarms()
    > Application.Calculate
    > Dim myCell As Range
    > For Each myCell In Range("A1", Range("A65536").End(xlUp))
    > Application.OnTime myCell.Value, "PlayWAV"
    > Next myCell
    > End Sub
    >
    > Sub CancelAlarms()
    > Dim myCell As Range
    > For Each myCell In Range("A1", Range("A65536").End(xlUp))
    > Application.OnTime myCell.Value, "PlayWAV", , False
    > Next myCell
    > End Sub
    >
    >
    >
    > "Rodney" <[email protected]> wrote in message
    > news:%[email protected]...
    > >
    > > I need to be called to my computer at differing
    > > times during the day. (approx 15-20)
    > >
    > > I have been using "Karen's Alarm Clock" but this
    > > only allows 5 settings.
    > >
    > > Can Excel be programmed to suit?
    > >
    > > Thanks
    > >
    > >
    > >

    >
    >




  4. #4
    Rodney
    Guest

    Re: Alarm Clock?

    Bernie, thankyou very much indeed.
    I'll give it a test drive today.

    May I seek your permission to post this code
    on my local Aust NG please?
    (with due authorship disclosure of course)

    Best Regards,
    Rodney



    "Bernie Deitrick" <deitbe @ consumer dot org> wrote in message news:#[email protected]...
    | Ooops, I used two different paths (meant to change the code before sending).
    | So, change the line
    |
    | WAVFile = "C:\Program Files\Ahead\Nero\Trumpet1"
    |
    | to reflect your wav file location.
    |
    | HTH,
    | Bernie
    | MS Excel MVP
    |
    |
    | "Bernie Deitrick" <deitbe @ consumer dot org> wrote in message
    | news:[email protected]...
    | > Rodney,
    | >
    | > Copy the code below and paste it into a codemodule in a new workbook.
    | Change
    | > the path and filename in this line to the file that you want to play:
    | >
    | > WAVFile = "C:\Sound Files\Trumpet1.wav"
    | >
    | > Enter dates and times starting in cell A1, and going down the column (as
    | > many as you want), in the format
    | >
    | > 5/12/2005 10:15:00 AM
    | >
    | > Then run SetAlarms.
    | >
    | > HTH,
    | > Bernie
    | > MS Excel MVP
    | >
    | >
    | > Private Declare Function PlaySound Lib "winmm.dll" _
    | > Alias "PlaySoundA" (ByVal lpszName As String, _
    | > ByVal hModule As Long, ByVal dwFlags As Long) As Long
    | >
    | > Const SND_SYNC = &H0
    | > Const SND_ASYNC = &H1
    | > Const SND_FILENAME = &H20000
    | >
    | > Sub PlayWAV()
    | > WAVFile = "C:\Program Files\Ahead\Nero\Trumpet1"
    | > Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
    | > End Sub
    | >
    | > Sub SetAlarms()
    | > Application.Calculate
    | > Dim myCell As Range
    | > For Each myCell In Range("A1", Range("A65536").End(xlUp))
    | > Application.OnTime myCell.Value, "PlayWAV"
    | > Next myCell
    | > End Sub
    | >
    | > Sub CancelAlarms()
    | > Dim myCell As Range
    | > For Each myCell In Range("A1", Range("A65536").End(xlUp))
    | > Application.OnTime myCell.Value, "PlayWAV", , False
    | > Next myCell
    | > End Sub
    | >
    | >
    | >
    | > "Rodney" <[email protected]> wrote in message
    | > news:%[email protected]...
    | > >
    | > > I need to be called to my computer at differing
    | > > times during the day. (approx 15-20)
    | > >
    | > > I have been using "Karen's Alarm Clock" but this
    | > > only allows 5 settings.
    | > >
    | > > Can Excel be programmed to suit?
    | > >
    | > > Thanks
    | > >
    | > >
    | > >
    | >
    | >
    |
    |



  5. #5
    Bernie Deitrick
    Guest

    Re: Alarm Clock?

    Rodney,

    The code can be posted where ever you want.

    I just hope it works ;-)
    (I tested it, of course...)

    Bernie
    MS Excel MVP

    > Bernie, thankyou very much indeed.
    > I'll give it a test drive today.
    >
    > May I seek your permission to post this code
    > on my local Aust NG please?
    > (with due authorship disclosure of course)




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1