Syntax

expression.BeforeRefresh(Cancel)

expression A variable that represents a QueryTable object.

Parameters

Name Required/Optional Data Type Description
Cancel Required Boolean False when the event occurs. If the event procedure sets this argument to True, the refresh doesn't occur when the procedure is finished.

Return Value
Nothing

Example

This example runs before the query table is refreshed.

Visual Basic for Applications
Private Sub QueryTable_BeforeRefresh(Cancel As Boolean) a = MsgBox("Refresh Now?", vbYesNoCancel) If a = vbNo Then Cancel = True MsgBox Cancel End Sub
Before any refresh of the query table? before refresh Before Refresh Event BeforeRefresh beforerefresh event

See also: