Emoncada
03-02-2012, 10:34 AM
I have a script that plays a wav when a msg box comes up.
How can I make it play 2 wav files back to back?
Option Explicit
Private Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName _
As String, ByVal uFlags As Long) As Long
Private Sub Worksheet_Change(ByVal Target As Range)
Dim PlaySound As Boolean
If InStr(1, Range("A2").Value, "#") Then
Application.ScreenUpdating = False
PlaySound = True
If PlaySound Then
Call sndPlaySound32("C:\housprob.wav", 1)
'This is where the other sound is
' Call sndPlaySound32("C:\DingDong.wav",1)
End If
MsgBox "Invalid Character Entered", vbOKOnly, "Invalid Character"
Range("A2").Select
Application.ScreenUpdating = True
I would like for them to play back to back
How can I make it play 2 wav files back to back?
Option Explicit
Private Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName _
As String, ByVal uFlags As Long) As Long
Private Sub Worksheet_Change(ByVal Target As Range)
Dim PlaySound As Boolean
If InStr(1, Range("A2").Value, "#") Then
Application.ScreenUpdating = False
PlaySound = True
If PlaySound Then
Call sndPlaySound32("C:\housprob.wav", 1)
'This is where the other sound is
' Call sndPlaySound32("C:\DingDong.wav",1)
End If
MsgBox "Invalid Character Entered", vbOKOnly, "Invalid Character"
Range("A2").Select
Application.ScreenUpdating = True
I would like for them to play back to back