Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If a cell contains a certfain value, Beep
I want to be alerted if a certain value would ever be the value of a cell.
For example, if I have a balance sheet and the total Assets do not equal the total liabilities, I want to be notified. But I don't want to have to run a vb macro to be alerted. I thought I could just get a notification when the recalc is done that something is wrong. How do I set this up? I don't want to add a Watch to a cell, because you get no visual or audio that there is a problem. It just shows up in the watch box. I want to be beeped the instant an out-of-balance condition is created. Thanks for any help you can give me. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
If a cell contains a certfain value, Beep
See this site:
http://office.microsoft.com/en-us/ma...298391033.aspx "Mike H." wrote: I want to be alerted if a certain value would ever be the value of a cell. For example, if I have a balance sheet and the total Assets do not equal the total liabilities, I want to be notified. But I don't want to have to run a vb macro to be alerted. I thought I could just get a notification when the recalc is done that something is wrong. How do I set this up? I don't want to add a Watch to a cell, because you get no visual or audio that there is a problem. It just shows up in the watch box. I want to be beeped the instant an out-of-balance condition is created. Thanks for any help you can give me. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
If a cell contains a certfain value, Beep
Mike, in a normal module paste this code:
Private Declare Function PlaySound Lib "winmm.dll" _ Alias "PlaySoundA" (ByVal lpszName As String, _ ByVal hModule As Long, ByVal dwFlags As Long) As Long Const SND_SYNC = &H0 Const SND_ASYNC = &H1 Const SND_FILENAME = &H20000 Sub PlayWAV() 'Adapted from Jwalks code @: http://j-walk.com/ss/excel/tips/tip59.htm Dim WAVFile As String WAVFile = "C:\WINDOWS\Media\Windows XP Error.wav" Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME) End Sub Then in the code for the sheet you are working on paste this code: Private Sub Worksheet_Change(ByVal Target As Range) 'Code written 10_2_2006 By Charles Chickering If Not Intersect(Target, Range("A1").Precedents) Is Nothing Then If Range("A1") 90 Then Call PlayWAV MsgBox "A1 is greater than 90" End If End If End Sub -- Charles Chickering "A good example is twice the value of good advice." "Mike H." wrote: I want to be alerted if a certain value would ever be the value of a cell. For example, if I have a balance sheet and the total Assets do not equal the total liabilities, I want to be notified. But I don't want to have to run a vb macro to be alerted. I thought I could just get a notification when the recalc is done that something is wrong. How do I set this up? I don't want to add a Watch to a cell, because you get no visual or audio that there is a problem. It just shows up in the watch box. I want to be beeped the instant an out-of-balance condition is created. Thanks for any help you can give me. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to add sound ( beep ) if cell content changes in live data | Excel Discussion (Misc queries) | |||
BEEP | Excel Discussion (Misc queries) | |||
No Beep | Excel Programming | |||
Is BEEP all there is?? | Excel Programming | |||
I want to *beep* *beep*!!!! | Excel Programming |