+ Reply to Thread
Results 1 to 5 of 5

Play a sound when a new high is detected

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Play a sound when a new high is detected

    I'm trying to play a sound if any cell in the range N3:N300 changes to the word 'Highest'.

    The cells in the range contain formulas and only show the word 'Highest' as a result of a MAX calculation on range P3:P300.

    Effectively , if the cell in N3:N300 changes to the new 'Highest' , then it should play the sound. It would only play when there is a change in the highest.

    For example if the highest cell is N145 and there is no change then no sound need be played. If it changes to say N55 then a sound would play.

    Can someone offer some event code to satisfy this?


    Grateful for any advice.

    Attached Files Attached Files
    Last edited by CDandVinyl; 12-06-2022 at 11:07 PM.
    Using Excel , Word and Access 2003 - For the whole of 2024

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Play a sound when a new high is detected

    You may try such code in Sheet1 module:

    Please Login or Register  to view this content.
    and to start from the first change add such code in ThisWorkbook module:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Re: Play a sound when a new high is detected

    Many thanks. I have got this working so I am grateful.

    I wonder if it possible to modify the code to work on the current worksheet , whatever it is called rather than 'Sheet1'? I'd like it to work on whichever worksheet is open.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Play a sound when a new high is detected

    If there are just few sheets you could insert almost identical procedures in each sheet module. So for sheet2 it could be:

    Please Login or Register  to view this content.
    and the code in this workbook could be:
    Please Login or Register  to view this content.
    If more than few sheets, probably whole process shall be redesigned maybe with the use of Sheet_calculate event handler in ThisWorkbook module (I'm not 100% sure it was available in excel 2003 :-/)

  5. #5
    Forum Contributor
    Join Date
    01-18-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    641

    Re: Play a sound when a new high is detected

    Ok That's fine.Thanks very much for your time and expertise.

    I was hoping there might be an ActiveSheet method for the code to run on the current worksheet without needing to name it specifically. My worksheet has 12 sheets so would need a lot of specific changes otherwise.
    Last edited by CDandVinyl; 12-08-2022 at 11:58 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Play a sound wav file
    By bittubadri in forum Excel General
    Replies: 0
    Last Post: 10-12-2022, 09:47 PM
  2. Play sound ONCE when cell value changes
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-28-2020, 12:19 PM
  3. play sound every x seconds
    By mokht in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2015, 04:05 PM
  4. Play sound when condition is met
    By Rufles in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-15-2014, 05:50 AM
  5. [SOLVED] Play Sound When Conditions are Met
    By Chris632 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-31-2013, 04:14 AM
  6. Play sound in Excel
    By buffalobill in forum Excel General
    Replies: 4
    Last Post: 11-03-2009, 08:45 AM
  7. Play Sound in Excel
    By nguyennb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-14-2009, 04:19 AM

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