Option Explicit
Public Declare Function SendCDcmd Lib "winmm.dll" _
Alias "mciSendStringA" ( _
ByVal lpstrCommand As String, _
ByVal lpstrReturnString As String, _
ByVal uReturnLength As Long, _
ByVal hwndCallback As Long) As Long
Dim lRet As Long
Public Sub EjectCD()
lRet = SendCDcmd("set CDAudio door open", vbNullString, 127, 0)
End Sub
Public Sub CloseCD()
lRet = SendCDcmd("set CDAudio door closed", vbNullString, 127, 0)
End Sub
Open and close your CD Door with this code.
Used as a Coffee cup holder LOL, don't laugh, someone actually thought that this was
what it was used for !