Macro.Run

Use this property to execute, stop, or check whether the macro is running or not.

Syntax Parameters Return value
- - Boolean

SVB Example

Tracing a call stack
Option Base 1
Option Explicit
    Dim m As Macro
    Dim CallStackText As String
Sub Main
    'iterate through the macros to find the one
    'that is currently running (which will
    'happen to be this one)
    For Each m In Macros
    If m.Run = True Then Exit For
    Next m
    'begin writing to the report
    CallStackText = m.ExecutingProcName
    FirstFunction
    SecondFunction
    ThirdFunction
    'write a report displaying the call stack sequence
    'throughout the macro
    Dim r As New Report
    r.SelectionText = CallStackText
    r.Visible = True
End Sub
Sub FirstFunction
    CallStackText = CallStackText & vbCrLf & m.ExecutingProcName
End Sub
Sub SecondFunction
    CallStackText = CallStackText & vbCrLf & m.ExecutingProcName
End Sub
Sub ThirdFunction
    CallStackText = CallStackText & vbCrLf & m.ExecutingProcName
End Sub