MacroDir Function

Syntax:

MacroDir[$]

Group:

Flow Control

Description: Returns the directory of the current macro. A run-time error occurs if the current macro has never been saved.

Example:

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

See Also:

MacroRun