Property: Count for Drives
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: Count for Drives
Property: Count for Drives
Returns the number of drives.
Object.Count
| Object | Drives Object with this property |
| Object.Count | LongInteger with read access |
The following example returns the number of drives:
Function CountDrives Dim fso, oMyDrive, oMyDrives Set fso = CreateObject("Scripting.FileSystemObject") Set oMyDrives = fso.Drives CountDrives = "Number of drives: " & oMyDrives.Count End Function