MacroDir$ Function

Syntax
MacroDir[$]
Group
Flow Control
Description
Return the directory of the current macro. A run-time error occurs if the current macro has never been saved.
Sandbox
Sandbox mode may block this function.
See Also
MacroRun

Sub Main
    ' open the file called Data that is in the
    ' same directory as the macro
    Open MacroDir & "\Data" For Input As #1
    Line Input #1, S$
    Debug.Print S$
    Close #1
End Sub