Skip to main content
Skip table of contents

VBA commands: Refresh

Visual Basic for Applications macros are supported in Excel Desktop for Windows only.

Description

Performs a Smart Refresh of all the data in the active report.

See Introduction to Velixo NX VBA commands for general usage information.

Syntax

CODE
objVelixo.Refresh [AsyncRefresh]

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

Arguments

Name

Required / Optional

Description

AsyncRefresh

Optional

Specifies whether the refresh should be done in the background.

Accepted values: True and False

Defaults to False.

When AsyncRefresh is set to False, Refresh runs synchronously and returns after data is retrieved, but Velixo NX calculations may still be running. While Velixo prevents calculations from being blocked, actions (e.g. hiding zero rows) may run before calculations finish, causing unexpected results.

We highly recommend setting AsyncRefresh to True and using a callback for any logic that depends on completed calculations.

Example - Asynchronous refresh

CODE
Dim velixoObj As Velixo_NX_Tools.VBA
Set velixoObj = CreateObject("Velixo.NX.Tools.Vba")

Application.DisplayAlerts = False

velixoObj.Refresh True 

JavaScript errors detected

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

If this problem persists, please contact our support.