Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Sub CommandButton1_Click()
Dim a(1 To 2) As String
a(1) = "C:\WINDOWS\MEDIA\Microsoft Office 2000\type.wav"
a(2) = "C:\WINDOWS\MEDIA\Microsoft Office 2000\DRUMROLL.WAV"
sndPlaySound a(CInt(TextBox1.Text)), 1
End Sub