Beep macro

thunderfoot

Board Regular
Joined
May 28, 2004
Messages
229
I have a worksheet in a file (linked to another EXCEL file which is constantly updated with 'live' information) that will operate a Module Macro routine when a button is pressed.

But before the button is pressed I want to be able to set-up an Audible 'BEEP' when one cell exceeds the value in another cell. This is currently done with a Visual Trigger (i.e. Conditional Formatting).

Is there a way to set-up a macro or something that runs constantly to identify (Audibly) when the value in one cell exceeds the value in another cell? Whilst this is running I still need to be able to invoke my Module Macro using a button.

Not sure how Worksheet/Workbook modules operate and how they are invoked, but is this the way to do it? If so, how?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Seems Ok. Here is a test ......................

In the code module for the sheet (right click tab/view code)
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Range("B1").Value > Range("A1").Value Then
        Beep
        MsgBox ("Value exceeeded")
    End If
End Sub
In a ordinary code module :-
Code:
Sub test()
    Range("A1").Value = 5
    For n = 1 To 10
        Range("B1").Value = n
    Next
End Sub
 
Upvote 0
beep

:(

i am unable to get my spreadsheet to beep, Brian. Since this is the very first time i'm using a macro, i imagine i'm doing what your signature says "starting in the wrong place".

Any trick to getting my spreadsheet to beep. Any trick to a new macro ?
 
Upvote 0
It may be a Windows system problem. Although it is not a problem, I notice that in my posh XP setup at home the beeps come through the sound card rather than internal speaker. Try the simple macro below to see if any sound is produced. Also check/test Sounds in Windows Control Panel :-

Code:
Sub Test()
    Beep
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,175
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top