CurDir$ Function
Returns a String representing the current path for the specified drive or the default drive.
The dollar sign suffix ($) explicitly indicates that this function returns a String type
(not a Variant).
Syntax
CurDir$[(drive)]
Parameters
drive: Optional.Stringexpression that specifies an existing drive. If no drive is specified or if drive is a zero-length string (""),CurDir$returns the path for the current drive.
Return Value
Returns a String containing the current directory path for the specified drive.
Examples
Dim currentDir As String
currentDir = CurDir$()
Dim cDrive As String
cDrive = CurDir$("C")