Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CD Tray?
Is it possible to DETECT weather the CD tray of a given CD/DVD ROM drive is
open or closed via Excel VBA? I can find a number of macros out there, which open or close the CD Tray, but is it possible to create a UDF that DETECTS if the tray is open? TIA, CE |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
CD Tray?
As far as I know, it is only possible to detect if the drive is ready :
Set fso = CreateObject("scripting.filesystemobject") If fso.getdrive("d:").IsReady = True Then MsgBox "drive with CD inside" Else MsgBox "no CD or tray open" End If Regards. Daniel Is it possible to DETECT weather the CD tray of a given CD/DVD ROM drive is open or closed via Excel VBA? I can find a number of macros out there, which open or close the CD Tray, but is it possible to create a UDF that DETECTS if the tray is open? TIA, CE |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
CD Tray?
Thanks, Daniel, But, I already knew about that one - only problem is that it does not quite do what I want... I figure that some sort of API call/programming is required, but that's a point where I'm absolutely lost... So, I'm still hoping that one of all the VBA/API sharks in here can solve this one for me :-) Thanks, anyway, Daniel :-) Daniel.C wrote: As far as I know, it is only possible to detect if the drive is ready : Set fso = CreateObject("scripting.filesystemobject") If fso.getdrive("d:").IsReady = True Then MsgBox "drive with CD inside" Else MsgBox "no CD or tray open" End If Regards. Daniel Is it possible to DETECT weather the CD tray of a given CD/DVD ROM drive is open or closed via Excel VBA? I can find a number of macros out there, which open or close the CD Tray, but is it possible to create a UDF that DETECTS if the tray is open? TIA, CE |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
CD Tray?
If you don't get an answer in the Excel newsgroups, you may want to post in a VB
newsgroup. Remember to include that you're code will be in Excel's VBA (and include the excel version). They may even tweak the code to work in VBA. "Charlotte E." wrote: Thanks, Daniel, But, I already knew about that one - only problem is that it does not quite do what I want... I figure that some sort of API call/programming is required, but that's a point where I'm absolutely lost... So, I'm still hoping that one of all the VBA/API sharks in here can solve this one for me :-) Thanks, anyway, Daniel :-) Daniel.C wrote: As far as I know, it is only possible to detect if the drive is ready : Set fso = CreateObject("scripting.filesystemobject") If fso.getdrive("d:").IsReady = True Then MsgBox "drive with CD inside" Else MsgBox "no CD or tray open" End If Regards. Daniel Is it possible to DETECT weather the CD tray of a given CD/DVD ROM drive is open or closed via Excel VBA? I can find a number of macros out there, which open or close the CD Tray, but is it possible to create a UDF that DETECTS if the tray is open? TIA, CE -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Minimize to Tray Button | Excel Programming | |||
Default Paper Tray | Excel Discussion (Misc queries) | |||
Printer Tray | Excel Programming | |||
Paper Tray selection Problem, | Excel Discussion (Misc queries) | |||
Print all worksheets from same tray | Excel Programming |