Main Sub
SyntaxGroupSub Main() ... End Sub -or- Private Sub Main() ... End Sub
DeclarationDescription
Form 1: Each macro must define Sub Main. A macro is a "program". Running a macro starts the Sub Main and continues to execute until the subroutine finishes.See Also
Form 2: A code module may define a Private Sub Main. This Sub Main is the code module initialization subroutine. If Main is not defined then no special initialization occurs.
Code Module