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.