How would I play a .wav on click?
Printable View
How would I play a .wav on click?
VB Code:
Option Explicit Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long Private Const SND_ASYNC = &H1 Private Const SND_FILENAME = &H20000 Private Sub Command1_Click() PlaySound "C:\TEST.WAV", 0&, SND_FILENAME Or SND_ASYNC End Sub