#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimize to Tray Button [email protected] Excel Programming 3 October 4th 06 05:10 PM
Default Paper Tray Thomas M Excel Discussion (Misc queries) 0 August 16th 06 07:48 AM
Printer Tray Mike Archer Excel Programming 2 January 24th 06 11:10 AM
Paper Tray selection Problem, Michael Hoffmann Excel Discussion (Misc queries) 4 December 3rd 04 09:08 PM
Print all worksheets from same tray E Jackson Excel Programming 1 August 14th 03 03:56 AM


All times are GMT +1. The time now is 03:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"