DriveLetter



Public Function GetDrive(Path As String) As String
Dim i As Integer
Dim DriveLetterOnly As String
For i = 1 To Len(Path)
DriveLetterOnly = Left(Path, i)
If Right(DriveLetterOnly, 1) = ":" Then
DriveLetterOnly = Left(DriveLetterOnly, i - 1)
GetDrive = DriveLetterOnly & ":" & "\"
Exit Function
End If
Next
End Function

(driveletter.html)- by Paolo Puglisi - Modifica del 25/3/2019