Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default retieving cd title and placing it into excel

Is there any way to get the title of a cd and paste it into a cell?

For example, I want to be able to insert a disc into my cd-rom and run
a macro that looks at the cd and records its 'title'. Title being what
shows up in windows explorer next to the drive letter.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default retieving cd title and placing it into excel

Sub ShowDriveInfo(ByRef drvPath As String)
Dim fso As Object
Dim drv As Object
Dim s As String
Set fso = CreateObject("Scripting.FileSystemObject")
Set drv = fso.GetDrive(fso.GetDriveName(drvPath))
s = "Drive " & UCase(drvPath) & " " & drv.VolumeName & " "
MsgBox s, vbInformation, " Drive Volume"
Set drv = Nothing
Set fso = Nothing
End Sub
'----------
Sub GetInfo()
Call ShowDriveInfo("E:\")
End Sub
----------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Jon"
wrote in message
oups.com...
Is there any way to get the title of a cd and paste it into a cell?

For example, I want to be able to insert a disc into my cd-rom and run
a macro that looks at the cd and records its 'title'. Title being what
shows up in windows explorer next to the drive letter.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default retieving cd title and placing it into excel

Thanks for the reply.

I ended up using Dir("f:", vbVolume)

This did what I wanted to do.

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
Toolbars placing at excel 2007 Vinod[_2_] Excel Discussion (Misc queries) 3 December 11th 07 07:29 PM
How do I put data in excel in placing order? eg first, second, th. JaneF Excel Discussion (Misc queries) 2 August 15th 07 09:44 PM
Named range=Column title,comumn title in cellB6 use B6in equation Graham Excel Discussion (Misc queries) 2 July 21st 06 10:03 AM
help with placing Logo on excel sheet Soth Excel Discussion (Misc queries) 4 July 11th 05 10:11 PM
help required with placing command buttons in Excel sameerce[_4_] Excel Programming 1 April 13th 04 06:16 AM


All times are GMT +1. The time now is 09:01 PM.

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"