Skip to main content
Skip table of contents

VBA: Refresh

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

CODE
objVelixo.Refresh [AsyncRefresh]

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

Arguments

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.

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

Application.DisplayAlerts = False

velixoObj.Refresh

Background (asynchronous) refresh

CODE
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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.