write at exceltoexplore@gmail.com : Report Automation|Dashboard in Excel| Provide Excel consulting through macro (VBA) automation |Financial Modeling | Ethical Hacking

Sunday, 12 June 2011

Open & Close CD Drawer from Excel





I found this on net, its amazing !



Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpCommandString As String, ByVal lpReturnString As String, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long

Public Sub OpenCDDoor()
Call mciSendString("set CDAudio door open", "", 0, 0)
End Sub

Public Sub CloseCDDoor()
Call mciSendString("set CDAudio door closed", "", 0, 0)
End Sub


No comments:

Post a Comment