Option Explicit
Private Declare Function auxGetNumDevs Lib “winmm.dll”() As Long
Private Sub Form_Load()
Dim i As Integer
i = auxGetNumDevs()
If i > 0 Then ’There is at least one sound card on the system
MsgBox “A Sound Card has been detected.”
Else ’auxGetNumDevs returns a 0 if there is no sound card
MsgBox “There is no Sound Card on this system.”
End If
End Sub