Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add sound ( beep ) if cell content changes in live data Bhavana Excel Discussion (Misc queries) 1 August 28th 08 07:55 PM
BEEP ziad Excel Discussion (Misc queries) 5 December 28th 07 03:56 PM
No Beep Certior Excel Programming 2 October 24th 05 05:01 PM
Is BEEP all there is?? Gary's Student Excel Programming 5 May 4th 05 07:42 PM
I want to *beep* *beep*!!!! KJTFS[_105_] Excel Programming 0 February 20th 04 02:59 PM


All times are GMT +1. The time now is 03:27 PM.

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

About Us

"It's about Microsoft Excel"