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
- 15383 reads
Recent comments
5 years 34 weeks ago
6 years 20 weeks ago
6 years 32 weeks ago
6 years 35 weeks ago
6 years 36 weeks ago
6 years 42 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago