I guess a msgbox pops up with a sound, probably wanted
a wave file though. Times done in Excel are usually a
big waste of a processor.
For playing a .wav file see
' Tip 59 Playing Sound From Excel
'
http://www.j-walk.com/ss/excel/tips/tip59.htm
Option Explicit
Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
'your own subroutine can be called from a worksheet event macro
Sub Double_beep()
Call sndPlaySound32("c:\i386\ringout.wav", 0)
End Sub
' Example of an Event Macro -- you will need to make playvalue100 in
' a regular module
' Option Explicit
' Private Sub Worksheet_SelectionChange(ByVal Target As Range)
' If Target.Address(0, 0) = "A1" And Target.Value = 100 Then
' playvalue100
' End If
' End Sub
An external timer, or a timer in another application would probably
better, unless you are triggering the start of the timer on an Excel Event.
Timer Wizard - freeware alarm eggtimer software for windows, allows
you to easily and quickly set a reminder for an event in the future. You
can choose how you wish to be alerted.
http://www.siliconmachines.net/timerwiz/index.htm
might find this interesting if you want to play every sound onyou system someday.
http://www.mvps.org/dmcritchie/excel/code/beeps.txt
HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:
http://www.mvps.org/dmcritchie/excel/search.htm
Bob Phillips said:
Something like this
Private Sub Worksheet_Calculate()
Dim cell As Range
On Error GoTo ws_exit:
Application.EnableEvents = False
For Each cell In Columns("C:C")
If cell.value > 0 Then
MsgBox "done"
End If
End If
ws_exit:
Application.EnableEvents = True
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.