hi all,
can anybody hell me how to get the avaliable system drives with the help of vb?
pradip
Printable View
hi all,
can anybody hell me how to get the avaliable system drives with the help of vb?
pradip
Using the EventVB.dll you can do this thus:
VB Code:
Option Explicit Dim vbLink As EventVB.ApiFunctions Public Sub ListDrives() If vbLink Is Nothing Then Set vbLink = New ApiFunctions End If Dim volThis As ApiVolume For Each volThis In vbLink.System.Volumes Debug.Print volThis.Volumename & " - " & volThis.SerialNumber Next volThis End Sub
HTH,
Duncan
Or put a drivelist and use this (you will not have to use a full megabyte dll)
You will need a drive listbox for this...VB Code:
For x = 0 To Drive1.ListCount - 1 Debug.Print Drive1.List(x) Next