Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Detecting the drive letter of a user's CD

(Windows XP, Excel 2000). We are endeavouring to open, with IE, a file
called "index.html" which we know is on the users's CD, but we don't
know the drive letter - ie. C:, D:, E:, F: etc. How can we find this ?
is there a wildcard option way of doing it ?

TIA - Charles
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Detecting the drive letter of a user's CD

Hi Charles

See Randy Birch's page
http://vbnet.mvps.org/code/disk/getmediatype.htm
and also
http://vbnet.mvps.org/code/disk/index.html

HTH. Best wishes Harald

"Charles Jordan" skrev i melding
om...
(Windows XP, Excel 2000). We are endeavouring to open, with IE, a file
called "index.html" which we know is on the users's CD, but we don't
know the drive letter - ie. C:, D:, E:, F: etc. How can we find this ?
is there a wildcard option way of doing it ?

TIA - Charles



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Detecting the drive letter of a user's CD

"Harald Staff" wrote in message ...
Hi Charles

See Randy Birch's page
http://vbnet.mvps.org/code/disk/getmediatype.htm
and also
http://vbnet.mvps.org/code/disk/index.html

HTH. Best wishes Harald

"Charles Jordan" skrev i melding
om...
(Windows XP, Excel 2000). We are endeavouring to open, with IE, a file
called "index.html" which we know is on the users's CD, but we don't
know the drive letter - ie. C:, D:, E:, F: etc. How can we find this ?
is there a wildcard option way of doing it ?

TIA - Charles


Harald - this is at least the second time that you have helped me - it
is very much appreciated. Charles
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Detecting the drive letter of a user's CD

Charles,

Set a reference (VBA, Tools menu, References) to the Microsoft
Scripting Runtime library, and use code like the following:

Dim FSO As New Scripting.FileSystemObject
Dim Drv As Scripting.Drive
For Each Drv In FSO.Drives
If Drv.DriveType = CDRom Then
Debug.Print Drv.DriveLetter
End If
Next Drv



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Charles Jordan" wrote in
message om...
(Windows XP, Excel 2000). We are endeavouring to open, with IE,
a file
called "index.html" which we know is on the users's CD, but we
don't
know the drive letter - ie. C:, D:, E:, F: etc. How can we find
this ?
is there a wildcard option way of doing it ?

TIA - Charles



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Detecting the drive letter of a user's CD

"Chip Pearson" wrote in message ...
Charles,

Set a reference (VBA, Tools menu, References) to the Microsoft
Scripting Runtime library, and use code like the following:

Dim FSO As New Scripting.FileSystemObject
Dim Drv As Scripting.Drive
For Each Drv In FSO.Drives
If Drv.DriveType = CDRom Then
Debug.Print Drv.DriveLetter
End If
Next Drv



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Charles Jordan" wrote in
message om...
(Windows XP, Excel 2000). We are endeavouring to open, with IE,
a file
called "index.html" which we know is on the users's CD, but we
don't
know the drive letter - ie. C:, D:, E:, F: etc. How can we find
this ?
is there a wildcard option way of doing it ?

TIA - Charles



Chip - I have been away and only just caught up with my messages.

I never fail to be amazed at the public spirit of you, and your
colleagues on this NG for volunteering your time and knowledge in this
*priceless* way. You may not remember, but I do, how you produced the
code for moving clock hands a year or two back, which has transformed
a key bit of our interactive economics textbook project. If ever you
are in Scotland, I very much hope that you will take the small
additional trouble of contacting me on
so we can hopefully say thank you properly, up here in the Highlands.
For what it's worth, your name also appears in the book's credits, and
extremely well earned too.

Thanks.

Charles
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
Obtain drive letter assignment of CD/DVD drive? EagleOne Excel Discussion (Misc queries) 1 October 13th 06 01:27 PM
Can I show server name instead of drive letter? bfant Excel Discussion (Misc queries) 9 February 17th 05 06:11 AM
Help to Indentify a drive letter Grandad Excel Programming 12 August 6th 04 08:50 PM
Using path instead of drive letter dumbass Excel Programming 2 May 25th 04 12:25 AM
How to find the drive letter? Mervyn Thomas Excel Programming 8 January 31st 04 01:11 PM


All times are GMT +1. The time now is 03:28 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"