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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.