how i can get all drive in my computer?
does anyone know how to get it??
Thanks.
Jump to Postyes, here it is the code, try it and let me know if it worked :
Dim AllDir Private Sub Form_Load() On Error Resume Next For i = 65 To 90 x = Dir(Chr(i) & ":\", vbDirectory + vbHidden + vbSystem) If Err = 52 Then Err.Clear …
yes, here it is the code, try it and let me know if it worked :
Dim AllDir
Private Sub Form_Load()
On Error Resume Next
For i = 65 To 90
x = Dir(Chr(i) & ":\", vbDirectory + vbHidden + vbSystem)
If Err = 52 Then
Err.Clear
Else
If x <> "" Then AllDir = AllDir & (Chr(i) & ":\")
Err.Clear
End If
Next i
MsgBox AllDir
End Sub
Hope this helps...
Hi,
One more Simple way:
Add a DriveListBox on the form and loop thru all the list items.. it lists all the drives
Regards
Veena
yes.. got it.
thank you all.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.