Visual Basic macros in Report Builder

WARNING
The legacy Report Builder is end-of-life in June 2026. As of July 1, 2026, workbooks scheduled using the legacy Report Builder will no longer be delivered.
  • You have until August 12, 2026 to migrate your workbooks from the legacy Report Builder to the new Report Builder. See convert your legacy workbooks for detailed information.
  • With the end of life of the Adobe Analytics 1.4 API’s, the legacy Report Builder add-in will no longer be available for download.
  • After August 12, 2026, customers with workbooks requiring migration will need to contact customer support to obtain the orignial workbooks. These workbooks will need to be migrated as documented in convert your legacy workbooks.
Report Builder
cloud destination for export

Visual Basic (VBA) macros provide features that help you refresh Excel workbooks. Visual Basic has access to the workbook, Excel, and Windows.

You must run the latest version of Report Builder and log in before running VBA macros.

IMPORTANT
For security reasons, you cannot schedule a workbook that contains a macro.

Adobe supports three Report Builder API methods.

RefreshAllReportBuilderRequests()

The RefreshAllReportBuilderRequests() macro refreshes all Report Builder requests in the active workbook. It starts by calling the Report Builder COM Add-in through its Product ID, then calls the RefreshAllRequests() API command:

Sub RefreshAllReportBuilderRequests()

 Dim addIn As COMAddIn
 Dim automationObject As Object
 Dim success As String
 Set addIn = Application.COMAddIns("ReportBuilderAddIn.Connect")
 Set automationObject = addIn.Object
 success = automationObject.RefreshAllRequests(ActiveWorkbook)

End Sub

RefreshAllReportBuilderRequestsInActiveWorksheet()

The RefreshAllReportBuilderRequestsInActiveWorksheet() macro refreshes all Report Builder requests in the active worksheet. The RefreshWorksheetRequests() API call takes a worksheet object as an argument. You can use this call for any worksheet that contains Report Builder requests:

Sub RefreshAllReportBuilderRequestsInActiveWorksheet()

 Dim addIn As COMAddIn
 Dim automationObject As Object
 Dim success As String
 Set addIn = Application.COMAddIns("ReportBuilderAddIn.Connect")
 Set automationObject = addIn.Object
 success = automationObject.RefreshWorksheetRequests(ActiveWorkbook.ActiveSheet)

End Sub

RefreshAllReportBuilderRequestsInCellsRange()

The RefreshAllReportBuilderRequestsInCellsRange() macro refreshes all Report Builder requests whose cell outputs intersect the specified range of cells. The cell range used in this example points to the range B1:B54 of the “Data” worksheet within the active workbook. The range expression supports all supported Excel range expressions:

Sub RefreshAllReportBuilderRequestsInCellsRange()

 Dim addIn As COMAddIn
 Dim automationObject As Object
 Dim success As String
 Set addIn = Application.COMAddIns("ReportBuilderAddIn.Connect")
 Set automationObject = addIn.Object
 success = automationObject.RefreshRequestsInCellsRange("'Data'!B1:B54")

End Sub
recommendation-more-help
analytics-help-analyze