VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simple code to list all the drives in the Machine

by Raghu (22 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 13th September 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Simple code to list all the drives in the Machine

API Declarations


'Use Reference : Microsoft Scripting Runtime
'Controls Used : ComboBox , Command Button, Form

Dim fs as Scripting.FileSystemObject
dim drv as drives,dr as drive

Rate Simple code to list all the drives in the Machine



set fs = CreateObject("Scripting.FileSystemObject")
set drv = fs.Drives
for each dr in drv
    Combo1.Additem dr.DriveLetter
next
End Sub

Download this snippet    Add to My Saved Code

Simple code to list all the drives in the Machine Comments

No comments have been posted about Simple code to list all the drives in the Machine. Why not be the first to post a comment about Simple code to list all the drives in the Machine.

Post your comment

Subject:
Message:
0/1000 characters