Audible Alarm

C

cmiedaner

Hello.

Is there a way to trigger an audible alarm if a given cell has a value greater than 0 ?

Could someone post the VBA ?
 
C

CM

Hi, Am Wed, 31 Oct 2012 11:11:21 -0700 (PDT) schrieb : > Is there a way to trigger an audible alarm if a given cell has a value greater than 0 ? copy code in module of the worksheet. It works with Range("C1") - modify to suit: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address <> "$C$1" Then Exit Sub If Target.Value > 0 Then Beep End Sub Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2

Thanks. I pasted the code into a module and the value in C1 is 1 but no beep ? I'm using excel 2010 - does that matter ?
 
C

Claus Busch

Hi,

Am Fri, 2 Nov 2012 11:20:19 -0700 (PDT) schrieb CM:
Thanks. I pasted the code into a module and the value in C1 is 1 but no beep ? I'm using excel 2010 - does that matter ?

the code must be copied in the code module of the worksheet. In Project
Explorer double click on the worksheet and copy the code in the code
module.


Regards
Claus Busch
 
C

cmiedaner

Hello. Is there a way to trigger an audible alarm if a given cell has a value greater than 0 ? Could someone post the VBA ?

Thanks again. I am not familiar with Projects/Explorer ?
 
C

Claus Busch

Hi,

Am Mon, 5 Nov 2012 09:31:14 -0800 (PST) schrieb (e-mail address removed):
I cannot open the spreadsheet. It needs a windows live id which i dont have.

you can follow the link and then right click on "CM" and choose
"Download"


Regards
Claus Busch
 
C

cmiedaner

Hi,



Am Mon, 5 Nov 2012 09:31:14 -0800 (PST) :






you can follow the link and then right click on "CM" and choose

"Download"


Thanks. I did get it to download. I entered a number greater than 0 in C1. Nothing happenned. Is it suppose to beep ?


Regards

Claus Busch

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2
 
C

Claus Busch

Hi,

Am Mon, 5 Nov 2012 10:37:57 -0800 (PST) schrieb (e-mail address removed):

a download is a strange source and therefore Excel disabled macros.
Enable macro and it will beep.


Regards
Claus Busch
 
C

cmiedaner

Hi,



Am Mon, 5 Nov 2012 10:37:57 -0800 (PST)






a download is a strange source and therefore Excel disabled macros.

Enable macro and it will beep.


The macros are enabled. Still no beep.


Regards

Claus Busch

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2
 
C

Claus Busch

Hi,

Am Mon, 5 Nov 2012 11:09:54 -0800 (PST) schrieb (e-mail address removed):


for 10 beeps change the code to:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim intCounter As Integer

If Target.Address <> "$C$1" Then Exit Sub

If Target.Value > 0 Then
For intCounter = 1 To 10
Beep
Application.Wait (Now + TimeValue("0:00:01"))
Next intCounter
End If
End Sub


Regards
Claus Busch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top