I have code that populates cells with various numbers. What is the simplest VBA that I could add so that it plays a rolling dice sound? I found the following code that plays some sound, but how can I get the 'Alarm01.wav, Clng(&H3' portion to play a rolling dice sound?
Declare PtrSafe Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Sub WAVPlay()
Dim X As Long
X = sndPlaySound("C:\Windows\Media\Alarm01.wav", CLng(&H3))
End Sub
Declare PtrSafe Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Sub WAVPlay()
Dim X As Long
X = sndPlaySound("C:\Windows\Media\Alarm01.wav", CLng(&H3))
End Sub