Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Audio Program

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0

Could any help me with the following code, I keep getting an error message on the line:

.DeviceType = "Sequencer"

Why is this? Thanks for any help!

Private Sub cmdPlay_Click()
Dim File As String, FileType As String * 3
If txtFiles.Text = "" Then
MsgBox "You haven't selected a file!"
Exit Sub
End If
File = lblPath & "\" & txtFiles.Text
FileType = Right(File, 3)
Select Case FileType
Case "rmi"
With SoundPlayer
.DeviceType = "Sequencer"
.FileName = File: .Command = "Open"
.Command = "Prev": .Command = "Play"
End With
Case "wav"
With SoundPlayer
.DeviceType = "WaveAudio"
.FileName = File: .Command = "Open"
.Command = "Prev": .Command = "Play"
End With
Case Else
MsgBox "Not a Valid Sound Effect!"
End Select
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top