Roy,
Right click the sheet tab, select "View Code", and paste this code into the window that appears.
This assumes that you have a formula like
=IF(C1="Test", "True", "False")
in cell A1 of that sheet.
Private Sub Worksheet_Calculate()
If Range("A1").Value = "True" Then
PlayMySound ("C:\Windows\Media\Jungle Error.wav")
End If
End Sub
In a regular codemodule in the same workbook, paste this code:
Declare Function sndPlaySound32 Lib "winmm.dll" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
Sub PlayMySound(myFileName As String)
Call sndPlaySound32(myFileName, 0)
End Sub
HTH,
Bernie
MS Excel MVP