Private Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long Private Sub Command1_Click() mciExecute ("set cdaudio door open") End Sub Private Sub Command2_Click() mciExecute ("set cdaudio door closed") End Sub