VBA: Refresh

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

Performs a smart refresh of all the data in the active report.

 

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


Syntax

objVelixo.Refresh [AsyncRefresh]

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

 

Parameters


Name

Description

AsyncRefresh

Optional. Boolean value that specifies if the refresh should be done in the background. Defaults to False.


Remarks


The Refresh method honors Excel's Application.DisplayAlerts flag.

 

If set to True, Refresh behaves just like when it is used from the toolbar (i.e. information, warning and errors will be displayed in message boxes).

 

If set to False, all information messages will be suppressed and all warning and error messages will instead be returned as exceptions.

 

Example

Foreground (synchronous) refresh


A synchronous Refresh is useful when you want to ensure the report is refreshed before performing the next action. Ex.: before report distribution.

 

Dim velixoObj As Velixo_Reports.VBA
Set velixoObj = CreateObject("Velixo.Reports.Vba")

Application.DisplayAlerts = False

velixoObj.Refresh

 

Background (asynchronous) refresh

Dim velixoObj As Velixo_Reports.VBA
Set velixoObj = CreateObject("Velixo.Reports.Vba")

Application.DisplayAlerts = False

velixoObj.Refresh True 

 

For information about tracking when a Background Refresh has completed, see How to execute custom VBA logic upon Velixo Refresh completion.


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