Playing a WAV Sound

  • Thread starter Thread starter SMiller
  • Start date Start date
S

SMiller

I have the site on how to play a wav sound from grahm R
seach as follows:Private Declare Function Beep Lib "kernel32" (ByVal
dwFreq As Long, ByVal
dwDuration As Long) As Long

Public Sub PlayBeep()
Dim iCtr As Long

For iCtr = 0 To 5000 Step 10
'Play a tone of iCtr hertz, for 50 milliseconds
Call Beep(iCtr, 50)
DoEvents
Next iCtr
End SubWHERE DO I PUT It to play when a form opens?:

Thanks
 
Back
Top