Syntax
IsMacro([WindowNumber])
Remarks
Returns –1 if the window specified by WindowNumber is a macro-editing window and 0 (zero) if it is not.
Argument | Explanation |
WindowNumber | Specifies a window on the Window menu: 1 corresponds to the first window, 2 to the second window, and so on. If WindowNumber is 0 (zero) or omitted, the active window is assumed. If WindowNumber does not correspond to a number on the Window menu, an error occurs. |
Example
This example creates a new document if the active window is a macro-editing window:
If IsMacro() = -1 Then FileNewDefault
See Also
MacroFileName$(), MacroNameFromWindow$(), SelInfo()