by Bhuwan Chand Joshi (69 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 21st July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get drive name
Public sub Form_Load()
Dim fso As New FileSystemObject
Dim strDriveName As String
strDriveName = fso.GetDriveName(fso.GetAbsolutePathName("D:\\\..Text1.txt"))
Debug.Print strDriveName
End Sub
'This program prints drive name from the file path you specified