Hi,

I have the code:

Private Declare Function sndPlaySound Lib "winmm.dll" _
   Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long

Private Sub Worksheet_Calculate()
Static oldval As Variant
If Range("J2").Value <> oldval Then
    oldval = Range("J2").Value
    PlayWavFile "c:\trimmed.wav", False
End If
End Sub
Sub PlayWavFile(WavFileName As String, Wait As Boolean)
    If Dir(WavFileName) = "" Then Exit Sub ' no file to play
    If Wait Then ' play sound before running any more code
        sndPlaySound WavFileName, 0
    Else ' play sound while code is running
        sndPlaySound WavFileName, 1
   End If
End Sub
How can I edit it so that a change in another cell will make another wav file play?

Thankyou