Private Declare Function sndPlaySound _
Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Sub EseguiSuono()
Dim NomeFile As String
Dim rc As Long
NomeFile = "C:\Musica\suono.wav"
rc = sndPlaySound(NomeFile, 1)
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" And Target.Value = 10 Then
EseguiSuono
End If
End Sub
|