A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How do I create a sound alert in excel spreadsheet



 
 
Thread Tools Display Modes
  #1  
Old February 27th 05, 04:57 PM
shaun t
external usenet poster
 
Posts: n/a
Default 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
Ads
  #2  
Old February 27th 05, 05:09 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default

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 > wrote in message
...
> 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



  #3  
Old February 27th 05, 06:49 PM
shaun t
external usenet poster
 
Posts: n/a
Default

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 > wrote in message
> ...
> > 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  
Old February 27th 05, 07:10 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default

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("D24")) 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" > wrote in message
...
> 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 > wrote in message
> > ...
> > > 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  
Old February 27th 05, 07:55 PM
shaun t
external usenet poster
 
Posts: n/a
Default

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("D24")) 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" > wrote in message
> ...
> > 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 > wrote in message
> > > ...
> > > > 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  
Old February 27th 05, 08:30 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default

Shaun,

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

The beep will only happen when any value in D24 is changed to 0.

--

HTH

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


"shaun t" > wrote in message
...
> 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("D24")) 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" > wrote in message
> > ...
> > > 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 > wrote in message
> > > > ...
> > > > > 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  
Old March 14th 06, 05:34 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default 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

  #8  
Old March 14th 06, 06:26 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default How do I create a sound alert in excel spreadsheet

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

"maks" > wrote in message
...
> 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  
Old November 23rd 08, 01:09 AM posted to microsoft.public.excel.misc
SOLI
external usenet poster
 
Posts: 7
Default How do I create a sound alert in excel spreadsheet

HI BOB
I AM USING THE SUGGESTION YOU PRINTED FOR SHAUN T AND IT WORKS FINE. HOW CAN
I CHANGE THE BEEP SOUND TO A CONTINUOUS SOUND OR MUSIC CLIP UNTIL I STOP IT
ACTIVELY?
FOR THE VALUE " 0 " , HOW CAN I MAKE THE MACRO USE THE CONTENT OF A GIVEN
CELL INSTEAD? THAT WAY I WILL BE ABLE TO CHANGE THE 0 VALUE WITHOUT HAVING TO
ENTER THE VBA CODE EVERY TIME.TKS.
SOLI


"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
> wrote in message
> ...
> > 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

>
>
>

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i create Lorenz curve in Excel???? Judit Charts and Charting in Excel 3 January 20th 05 07:56 PM
Convert Word Table to Excel Spreadsheet [email protected] Excel Discussion (Misc queries) 1 January 18th 05 11:57 PM
How do I stop Macros from opening with every excel spreadsheet? AlexMilos Excel Discussion (Misc queries) 1 January 13th 05 08:44 PM
Is there a way to create a standard OHLC bar chart in Excel? [email protected] Charts and Charting in Excel 3 December 2nd 04 10:49 PM
Can I import a Word table to an Excel spreadsheet? Liz Excel Worksheet Functions 1 November 25th 04 05:41 PM


All times are GMT +1. The time now is 04:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 ExcelBanter.
The comments are property of their posters.