Advanced Use of ProfVBA: Inline Commands
Don Soloway extended ProfVBA to be able to use commands embedded as comments in the VBA code to drive the addition of Profiler calls for Loops.
This allows you to retain profiling instrumentation in interesting areas of your code without impacting execution.
Then you can call Add Profiler Calls to easily regenerate all the profiling start and end calls. Calling Remove Profiler calls will remove the Start and End calls but leave the Inline Commands intact.
The format of the inline commands is as follows:
‘TagString Start profilerName [variableName] [stackPush]
‘TagString End profilerName [variableName] [stackPop] [displayToImmediate]
Where
TagString is an identifying string to indicate that an inline command follows. The TagString currently equals gfxlProfVBA.
profilerName is a user specified name for that timer
variableName is the increment variable name for the For To loops
stackPush is to save the UID2 for nested loops
stackPop is to retrieve the UID2 for nested loops
displayToImmediate is to indicate that output is sent to the immediate window. This takes the value of True or False.
|