+ Reply to Thread
Results 1 to 11 of 11

How do I create a sound alert in excel spreadsheet

  1. #1
    shaun t
    Guest

    How do I create a sound alert in excel spreadsheet

    How do I create a sound alert, to use ,for when a cell value changes to a
    given value. ie: I am importing realtime data and want a sound to notify when
    when a certain value is detected

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451
    This is what answered it for me when I wanted to do the same thing:

    http://j-walk.com/ss/excel/tips/tip87.htm

  3. #3
    Bob Phillips
    Guest

    Re: How do I create a sound alert in excel spreadsheet

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim i As Long
    On Error GoTo ws_exit:
    Application.EnableEvents = False
    If Not Intersect(Target, Me.Range("A1:H10")) Is Nothing Then
    With Target
    Beep
    End With
    End If

    ws_exit:
    Application.EnableEvents = True
    End Sub

    'This is worksheet event code, which means that it needs to be
    'placed in the appropriate worksheet code module, not a standard
    'code module. To do this, right-click on the sheet tab, select
    'the View Code option from the menu, and paste the code in.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "shaun t" <shaun [email protected]> wrote in message
    news:[email protected]...
    > How do I create a sound alert, to use ,for when a cell value changes to a
    > given value. ie: I am importing realtime data and want a sound to notify

    when
    > when a certain value is detected




  4. #4
    shaun t
    Guest

    Re: How do I create a sound alert in excel spreadsheet

    Hi Bob

    Thanks alot, sure its just what I want, but a little over my head

    Have pasted code as you said, was the code to start at

    private and end at end sub

    the cell range I am monitoring is d2:d4, and the value I want to trigger the
    alert is 0 ( zero). Where is this entered into the code you said paste

    Cheers again Shaun

    "Bob Phillips" wrote:

    > Private Sub Worksheet_Change(ByVal Target As Range)
    > Dim i As Long
    > On Error GoTo ws_exit:
    > Application.EnableEvents = False
    > If Not Intersect(Target, Me.Range("A1:H10")) Is Nothing Then
    > With Target
    > Beep
    > End With
    > End If
    >
    > ws_exit:
    > Application.EnableEvents = True
    > End Sub
    >
    > 'This is worksheet event code, which means that it needs to be
    > 'placed in the appropriate worksheet code module, not a standard
    > 'code module. To do this, right-click on the sheet tab, select
    > 'the View Code option from the menu, and paste the code in.
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "shaun t" <shaun [email protected]> wrote in message
    > news:[email protected]...
    > > How do I create a sound alert, to use ,for when a cell value changes to a
    > > given value. ie: I am importing realtime data and want a sound to notify

    > when
    > > when a certain value is detected

    >
    >
    >


  5. #5
    Bob Phillips
    Guest

    Re: How do I create a sound alert in excel spreadsheet

    Shaun,

    This is modified to your particular needs. Follow the instructions after the
    previous piece of code so as to know where to put it

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim i As Long
    On Error GoTo ws_exit:
    Application.EnableEvents = False
    If Not Intersect(Target, Me.Range("D2:D4")) Is Nothing Then
    With Target
    if .value = 0 Then Beep
    End With
    End If

    ws_exit:
    Application.EnableEvents = True
    End Sub


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "shaun t" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Bob
    >
    > Thanks alot, sure its just what I want, but a little over my head
    >
    > Have pasted code as you said, was the code to start at
    >
    > private and end at end sub
    >
    > the cell range I am monitoring is d2:d4, and the value I want to trigger

    the
    > alert is 0 ( zero). Where is this entered into the code you said paste
    >
    > Cheers again Shaun
    >
    > "Bob Phillips" wrote:
    >
    > > Private Sub Worksheet_Change(ByVal Target As Range)
    > > Dim i As Long
    > > On Error GoTo ws_exit:
    > > Application.EnableEvents = False
    > > If Not Intersect(Target, Me.Range("A1:H10")) Is Nothing Then
    > > With Target
    > > Beep
    > > End With
    > > End If
    > >
    > > ws_exit:
    > > Application.EnableEvents = True
    > > End Sub
    > >
    > > 'This is worksheet event code, which means that it needs to be
    > > 'placed in the appropriate worksheet code module, not a standard
    > > 'code module. To do this, right-click on the sheet tab, select
    > > 'the View Code option from the menu, and paste the code in.
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "shaun t" <shaun [email protected]> wrote in message
    > > news:[email protected]...
    > > > How do I create a sound alert, to use ,for when a cell value changes

    to a
    > > > given value. ie: I am importing realtime data and want a sound to

    notify
    > > when
    > > > when a certain value is detected

    > >
    > >
    > >




  6. #6
    shaun t
    Guest

    Re: How do I create a sound alert in excel spreadsheet

    Hi again Bob

    Have done as you have instructed

    When the code is pasted, what do I do with the headins in the two drop downs
    above

    The first has in it WORKSHEET and GENERAL

    The second has CHANGE ACTIVATE etc and several others

    The reason I am asking as the code does not generate a BEEP when the value
    is 0

    Cheers Shaun

    "Bob Phillips" wrote:

    > Shaun,
    >
    > This is modified to your particular needs. Follow the instructions after the
    > previous piece of code so as to know where to put it
    >
    > Private Sub Worksheet_Change(ByVal Target As Range)
    > Dim i As Long
    > On Error GoTo ws_exit:
    > Application.EnableEvents = False
    > If Not Intersect(Target, Me.Range("D2:D4")) Is Nothing Then
    > With Target
    > if .value = 0 Then Beep
    > End With
    > End If
    >
    > ws_exit:
    > Application.EnableEvents = True
    > End Sub
    >
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "shaun t" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi Bob
    > >
    > > Thanks alot, sure its just what I want, but a little over my head
    > >
    > > Have pasted code as you said, was the code to start at
    > >
    > > private and end at end sub
    > >
    > > the cell range I am monitoring is d2:d4, and the value I want to trigger

    > the
    > > alert is 0 ( zero). Where is this entered into the code you said paste
    > >
    > > Cheers again Shaun
    > >
    > > "Bob Phillips" wrote:
    > >
    > > > Private Sub Worksheet_Change(ByVal Target As Range)
    > > > Dim i As Long
    > > > On Error GoTo ws_exit:
    > > > Application.EnableEvents = False
    > > > If Not Intersect(Target, Me.Range("A1:H10")) Is Nothing Then
    > > > With Target
    > > > Beep
    > > > End With
    > > > End If
    > > >
    > > > ws_exit:
    > > > Application.EnableEvents = True
    > > > End Sub
    > > >
    > > > 'This is worksheet event code, which means that it needs to be
    > > > 'placed in the appropriate worksheet code module, not a standard
    > > > 'code module. To do this, right-click on the sheet tab, select
    > > > 'the View Code option from the menu, and paste the code in.
    > > >
    > > > --
    > > >
    > > > HTH
    > > >
    > > > RP
    > > > (remove nothere from the email address if mailing direct)
    > > >
    > > >
    > > > "shaun t" <shaun [email protected]> wrote in message
    > > > news:[email protected]...
    > > > > How do I create a sound alert, to use ,for when a cell value changes

    > to a
    > > > > given value. ie: I am importing realtime data and want a sound to

    > notify
    > > > when
    > > > > when a certain value is detected
    > > >
    > > >
    > > >

    >
    >
    >


  7. #7
    Bob Phillips
    Guest

    Re: How do I create a sound alert in excel spreadsheet

    Shaun,

    You don't need to do anything with them, it is already effectively done.

    The beep will only happen when any value in D2:D4 is changed to 0.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "shaun t" <[email protected]> wrote in message
    news:[email protected]...
    > Hi again Bob
    >
    > Have done as you have instructed
    >
    > When the code is pasted, what do I do with the headins in the two drop

    downs
    > above
    >
    > The first has in it WORKSHEET and GENERAL
    >
    > The second has CHANGE ACTIVATE etc and several others
    >
    > The reason I am asking as the code does not generate a BEEP when the value
    > is 0
    >
    > Cheers Shaun
    >
    > "Bob Phillips" wrote:
    >
    > > Shaun,
    > >
    > > This is modified to your particular needs. Follow the instructions after

    the
    > > previous piece of code so as to know where to put it
    > >
    > > Private Sub Worksheet_Change(ByVal Target As Range)
    > > Dim i As Long
    > > On Error GoTo ws_exit:
    > > Application.EnableEvents = False
    > > If Not Intersect(Target, Me.Range("D2:D4")) Is Nothing Then
    > > With Target
    > > if .value = 0 Then Beep
    > > End With
    > > End If
    > >
    > > ws_exit:
    > > Application.EnableEvents = True
    > > End Sub
    > >
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "shaun t" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > Hi Bob
    > > >
    > > > Thanks alot, sure its just what I want, but a little over my head
    > > >
    > > > Have pasted code as you said, was the code to start at
    > > >
    > > > private and end at end sub
    > > >
    > > > the cell range I am monitoring is d2:d4, and the value I want to

    trigger
    > > the
    > > > alert is 0 ( zero). Where is this entered into the code you said paste
    > > >
    > > > Cheers again Shaun
    > > >
    > > > "Bob Phillips" wrote:
    > > >
    > > > > Private Sub Worksheet_Change(ByVal Target As Range)
    > > > > Dim i As Long
    > > > > On Error GoTo ws_exit:
    > > > > Application.EnableEvents = False
    > > > > If Not Intersect(Target, Me.Range("A1:H10")) Is Nothing Then
    > > > > With Target
    > > > > Beep
    > > > > End With
    > > > > End If
    > > > >
    > > > > ws_exit:
    > > > > Application.EnableEvents = True
    > > > > End Sub
    > > > >
    > > > > 'This is worksheet event code, which means that it needs to be
    > > > > 'placed in the appropriate worksheet code module, not a standard
    > > > > 'code module. To do this, right-click on the sheet tab, select
    > > > > 'the View Code option from the menu, and paste the code in.
    > > > >
    > > > > --
    > > > >
    > > > > HTH
    > > > >
    > > > > RP
    > > > > (remove nothere from the email address if mailing direct)
    > > > >
    > > > >
    > > > > "shaun t" <shaun [email protected]> wrote in message
    > > > > news:[email protected]...
    > > > > > How do I create a sound alert, to use ,for when a cell value

    changes
    > > to a
    > > > > > given value. ie: I am importing realtime data and want a sound to

    > > notify
    > > > > when
    > > > > > when a certain value is detected
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >




  8. #8
    maks
    Guest

    RE: How do I create a sound alert in excel spreadsheet

    hi!
    Did you found answer?

    "shaun t" wrote:

    > How do I create a sound alert, to use ,for when a cell value changes to a
    > given value. ie: I am importing realtime data and want a sound to notify when
    > when a certain value is detected


  9. #9
    Ryan Jones
    Guest

    Re: How do I create a sound alert in excel spreadsheet

    You can use a beep command in the sheet code under change

    "maks" <[email protected]> wrote in message
    news:[email protected]...
    > hi!
    > Did you found answer?
    >
    > "shaun t" wrote:
    >
    >> How do I create a sound alert, to use ,for when a cell value changes to a
    >> given value. ie: I am importing realtime data and want a sound to notify
    >> when
    >> when a certain value is detected




  10. #10
    Registered User
    Join Date
    10-09-2012
    Location
    chicago,il.
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: How do I create a sound alert in excel spreadsheet

    i'm very new to vba, so i'm also very confused. this forum has been quite helpful so far. i'm trying to create different sounds on different sheets within excel when the values are above a certail threshold but need help in doing so

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How do I create a sound alert in excel spreadsheet

    jixy,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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