The following macro is linked to an IF statement in cell W59. I would like the macro to play only ONCE when the IF statement is true. The macro will continuously play the sound if the reference value in cell 059 changes. Is there a way to modify this method so that the macro only plays a sound ONCE?
Private Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" (ByVal lpszName As String, _
ByVal hModule As Long, ByVal dwFlags As Long) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000
Function SoundMe() As String
Call PlaySound("c:\windows\media\tada.wav", _
0, SND_ASYNC Or SND_FILENAME)
SoundMe = ""
End Function
Bookmarks