Actually, while that works, relying on the Scripting library isn't the most
robust approach.
Instead, check out http://www.mvps.org/access/api/api0003.htm at Dev
Ashish's "The Access Web" for an API-based solution that doesn't require any
additional references.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
Quote:
> Brilliant! Thanks
> > Set a reference to the scripting runtime dll: SCRRUN.DLL
> > Use the Object Browser to inspect the methods/properties.
> > Sample sub:
> > CDs are type = 4
> > Public Sub ShowDrives()
> > 'with a reference set...
> > Dim fso As Scripting.FileSystemObject
> > Dim oDrive As Scripting.Drive
> > Set fso = CreateObject("Scripting.FileSystemObject")
> > For Each oDrive In fso.Drives
> > Debug.Print oDrive.DriveLetter, oDrive.DriveType
> > Next
> > Set oDrive = Nothing
> > Set fso = Nothing
> > End Sub
> > Public Sub ShowDrives2()
> > 'without a reference set...
> > Dim fso As Object
> > Dim oDrive As Object
> > Set fso = CreateObject("Scripting.FileSystemObject")
> > For Each oDrive In fso.Drives
> > Debug.Print oDrive.DriveLetter, oDrive.DriveType
> > Next
> > Set oDrive = Nothing
> > Set fso = Nothing
> > End Sub
> > Steve
> > > Hi,
> > > I'm developing a photo archive application for districbution to
unknown
> > > machines.
> > > Can anyone point me where to find some direction how to enumerate
> cd-roms
> > on
> > > a system in vba?
> > > Thanks for any help