Open/Close CD Tray using VBA
Paste the following code in a module and try the two modules for open or close CD Tray.
Declare Sub mciSendStringA Lib "winmm.dll" (ByVal lpstrCommand As String, _ ByVal lpstrReturnString As Any, ByVal uReturnLength As Long, _ ByVal hwndCallback As Long) Sub CDTrayOpen() mciSendStringA "Set CDAudio Door Open", 0&, 0, 0 End Sub Sub CDTrayClose() mciSendStringA "Set CDAudio Door Closed", 0&, 0, 0 End Sub
»
- Vishesh's blog
- Login or register to post comments
- 15270 reads
Recent comments
5 years 6 weeks ago
5 years 44 weeks ago
6 years 4 weeks ago
6 years 7 weeks ago
6 years 8 weeks ago
6 years 13 weeks ago
6 years 21 weeks ago
6 years 22 weeks ago
6 years 22 weeks ago
6 years 22 weeks ago