ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Audible Alarm (https://www.excelbanter.com/excel-programming/447535-audible-alarm.html)

[email protected]

Audible Alarm
 
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 ?

Claus Busch

Audible Alarm
 
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

CM[_6_]

Audible Alarm
 
On Wednesday, October 31, 2012 2:23:26 PM UTC-4, Claus Busch wrote:
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 ?

Claus Busch

Audible Alarm
 
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
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

[email protected]

Audible Alarm
 
On Wednesday, October 31, 2012 2:11:22 PM UTC-4, wrote:
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 ?

Claus Busch

Audible Alarm
 
Hi,

Am Fri, 2 Nov 2012 12:04:12 -0700 (PDT) schrieb :

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


have a look for the workbook "CM":
https://skydrive.live.com/#cid=9378A...121822A3%21191


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

[email protected]

Audible Alarm
 
On Friday, November 2, 2012 3:05:56 PM UTC-4, Claus Busch wrote:
Hi, Am Fri, 2 Nov 2012 12:04:12 -0700 (PDT) Thanks again. I am not familiar with Projects/Explorer ? have a look for the workbook "CM": https://skydrive.live.com/#cid=9378A...121822A3%21191 Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2


I cannot open the spreadsheet. It needs a windows live id which i dont have..

Claus Busch

Audible Alarm
 
Hi,

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

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
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

[email protected]

Audible Alarm
 
On Monday, November 5, 2012 12:34:24 PM UTC-5, Claus Busch wrote:
Hi,



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



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"


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



Claus Busch

Audible Alarm
 
Hi,

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

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


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


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

[email protected]

Audible Alarm
 
On Monday, November 5, 2012 1:40:53 PM UTC-5, Claus Busch wrote:
Hi,



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



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




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



[email protected]

Audible Alarm
 
On Monday, November 5, 2012 1:58:42 PM UTC-5, wrote:
On Monday, November 5, 2012 1:40:53 PM UTC-5, Claus Busch wrote:

Hi,








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








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








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




Enable macro and it will beep.






The macros are enabled. Still no beep.


Ok. I got it to beep. However, it only beeps once. Can this be made to beep continuously ?




Regards




Claus Busch




--




Win XP PRof SP2 / Vista Ultimate SP2




Office 2003 SP2 /2007 Ultimate SP2



Claus Busch

Audible Alarm
 
Hi,

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


Ok. I got it to beep. However, it only beeps once. Can this be made to beep continuously ?


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
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


All times are GMT +1. The time now is 08:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com