VBA: RunDistributionList

Created by Damien Zwillinger, Modified on Tue, 22 Oct at 11:07 AM by Harry Lewis

Applies to:

  • Velixo Classic



Important: Visual Basic for Applications macros are not supported by Excel Online.



Purpose

Distribute the report using the provided distribution list worksheet. This is the equivalent to using the "Distribute All" button from the toolbar.

 

See Introduction to Velixo's VBA functions for general usage information.

 

Syntax

  objVelixo.RunDistributionList Worksheet

objVelixo - a variable that represents an instance of the Velixo VBA functions class.

 

Parameters


Name

Description

Worksheet

Required. Excel.Worksheet value that provides the Distribution List worksheet to act upon.


Remarks


If Application.DisplayAlerts is set to False, any message boxes will be suppressed and warnings and errors will be returned as exceptions. This is especially useful for a fully unattended automation. Once completed, set back DisplayAlerts to True.


❗ When a Distribution List is used with a report containing pivot tables, pivot tables are not automatically refreshed as part of the Distribution process; you need to explicitly enable this. For more information, see the Distribution List article.


Example

Dim velixoObj As Velixo_Reports.VBA
Dim distributionWorksheet As Excel.Worksheet
Dim currentWorkbook As Excel.Workbook

Set velixoObj = CreateObject("Velixo.Reports.Vba")

Application.DisplayAlerts = False

Set currentWorkbook = Application.ActiveWorkbook
Set distributionWorksheet = currentWorkbook.Worksheets("Distribution List")

velixoObj.RunDistributionList distributionWorksheet

Application.DisplayAlerts = True

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article