Form.BeforeRender Event (Access)

Occurs before any object in the specified PivotChart view has been rendered.

Syntax

expression .BeforeRender(drawObject, chartObject, Cancel)

expression A variable that represents a Form object.

Parameters

Name

Required/Optional

Data Type

Description

drawObject

Required

Object

A reference to the ChChartDraw object. Use the DrawType property of the returned object to determine what type of rendering is about to occur.

chartObject

Required

Object

The object that is to be rendered. Use the TypeName function to determine the type of the object.

Cancel

Required

Object

Set the Value property of this object to True to cancel the rendering of the PivotChart View object.

Return Value

nothing

Example

The following example demonstrates the syntax for a subroutine that traps the BeforeRender event.

Private Sub Form_BeforeRender( _ 
 ByVal drawObject As Object, _ 
 ByVal chartObject As Object, _ 
 ByVal Cancel As Object) 
 Dim intResponse As Integer 
 Dim strPrompt As String 
 
 strPrompt = "Cancel render of current object?" 
 
 intResponse = MsgBox(strPrompt, vbYesNo) 
 
 If intResponse = vbYes Then 
 Cancel.Value = True 
 Else 
 Cancel.Value = False 
 End If 
End Sub

See Also

Concepts

Form Object Members

Form Object