Navigation: FXLV4Profiler >

Calling FastExcel Profiling Methods from VBA

 

 

 

Calling FastExcel Profiling Methods

FastExcel V4 Profiler has a VBA API that enables you to call the FastExcel Profiling commands from VBA.

You first need to add a reference to your VBA project that references FastExcel V4 Profiler:
Alt-F11 to go to the VBE, then Tools References and check the box beside fxl4Profiler.

Now in your VBA code you can add statements like

Fxl4Profiler.vbaProfDrillAPI

This calls the Drilldown profiler on whatever is currently the active workbook.
It is not generally a good idea to make this call when your VBA code is within the active workbook, because by default the Profiler closes and then reopens the workbook, thus interrupting your VBA.

The available Profiling APIs are:

fxl4Profiler.gblSilentProfile – a boolean switch that, when True, prevents the Profiling commands from showing messages and user-forms.

fxl4Profiler.gblNotReopenBook – a boolean switch that, when set to True, prevents the Profiling commands from finding worksheet overheads and closing and re-opening the profiled workbook.

Use this switch if you are using the ProfDrillAPI from within the workbook to be profiled.

fxl4Profiler.vbaProfDrillAPI – this runs the FastExcel Drilldown Profiler on the active workbook

fxl4Profiler.vbaProfBookAPI – this runs FastExcel Profile Workbook on the active workbook

fxl4Profiler.vbaProfSheetAPI – this runs FastExcel Profile Worksheet on the active worksheet

fxl4Profiler.vbaProfFormulasAPI – this runs FastExcel Profile Formulas on the active worksheet

fxl4Profiler.vbaProfCheck – this runs FastExcel Check workbook on the active workbook

NOTES:

Calling one of these profiling commands will generally change the active workbook.

If you want to call two commands in succession from your VBA, make sure the VBA resets the active workbook and active worksheet appropriately before each command.

When using gblNotReopenBook it is NOT recommended to save the profiled workbook after ProfDrill or ProfBook. Instead close and reopen the workbook manually after Profiling.

 

 

 

Copyright © 2022 Decision Models Ltd.