Greetings Chris,
Not sure what code you found, but you can use an API Function to play a sound and just use different files for the different values. Something along the lines of:
In a Standard Module:
Option Explicit
' Taken from an example at Chip Pearson's site:
' http://www.cpearson.com/excel/PlaySound.aspx
Public Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long _
) As Long
Public Const SND_SYNC = &H0 ' (Default) Play the sound synchronously. Code execution
' pauses until sound is complete.
Public Const SND_ASYNC = &H1 ' Play the sound asynchronously. Code execution
' does not wait for sound to complete.
Public Const SND_NODEFAULT = &H2 ' If the specified sound is not found, do not play
' the default sound (no sound is played).
'public Const SND_MEMORY = &H4 ' lpszSoundName is a memory file of the sound.
' Not used in VBA/VB6.
Public Const SND_LOOP = &H8 ' Continue playing sound in a loop until the next
' call to sndPlaySound.
Public Const SND_NOSTOP = &H10 ' Do not stop playing the current sound before playing
' the specified sound.
In the Worksheet's Module:
[VBA]
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Cells(1), Target) Is Nothing And Target.Count = 1 Then
Select Case Cells(1).Value
Case 0
If Not Cells(1).Value = vbNullString Then
sndPlaySound32 "C:\Windows\Media\Chimes.wav", SND_SYNC Or SND_NODEFAULT
End If
Case 1
sndPlaySound32 "C:\Windows\Media\Chord.wav", SND_SYNC Or SND_NODEFAULT
End Select
End If
End Sub[/VBA]
Hope that helps,
Mark