Play Audio File using Excel VBA / Excel VBA Play Wav File
Here is a small snippet used by Pradeep Meesala to play a wav file. He has used this for an elegant splash screen, which was a nice combination of music and display
The code uses PlaySound API Function
Private Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" (ByVal lpszName As String, _
ByVal hModule As Long, ByVal dwFlags As Long) As Long
Sub Play_Wav_File()
Dim sWAVFile As String
On Error GoTo Err_Play
sWAVFile = "C:\Temp\Windows XP Logon Sound.wav"
PlaySound(sWAVFile, &O0, 0)
Err_Play:
If Err <> 0 Then
Err.Clear()
End If
End Sub