Private Sub Form_BeforeRender(ByVal drawObject As Object, ByVal chartObject As Object, ByVal Cancel As Object)
drawObject 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 The object that is to be rendered. Use the TypeName function to determine the type of the object.
Cancel Set the Value property of this object to True to cancel the rendering of the PivotChart View object.
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