CurDir Function


CurDir( drive )

Returns the current path for the specified drive.

CurDir returns a Variant; CurDir$ returns a String.

Example:

    Declare Function CurDir Lib "NewFuns.dll" () As String

 

    Sub Form_Click()

        Dim Msg, NL   ' Declare variables.

        NL = Chr(10)   ' Define newline.

        Msg = "The current directory is: "

        Msg = Msg & NL & CurDir()

        MsgBox Msg   ' Display message.

    End Sub