Access/VBA Library

GetDriveLetter

Private function to extract the first letter from the argument and returns this in uppercase.

Syntax

GetDriveLetter( drive )
Parameters
Name Type Description
drive String Required.
Return value

String

Code
Private Function GetDriveLetter(drive As String) As String
    GetDriveLetter = UCase$(Left$(Trim(drive), 1))
End Function
Stringtag:String