|
-
Aug 3rd, 2002, 10:27 PM
#1
Thread Starter
Lively Member
How to get avaliable drives using vb
hi all,
can anybody hell me how to get the avaliable system drives with the help of vb?
pradip
-
Aug 4th, 2002, 05:14 AM
#2
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
-
Aug 4th, 2002, 11:02 AM
#3
Frenzied Member
Or put a drivelist and use this (you will not have to use a full megabyte dll)
VB Code:
For x = 0 To Drive1.ListCount - 1
Debug.Print Drive1.List(x)
Next
You will need a drive listbox for this...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|