Access) (Form.BeforeRender 事件

發生於指定的 [樞紐分析圖檢視] 中任何物件進行轉換之前。

語法

運算式。BeforeRender (drawObject, chartObject, Cancel)

expression 代表 Form 物件的變數。

參數

名稱 必要/選用 資料類型 描述
drawObject 必要 Object ChChartDraw 物件的參照。 使用傳回的物件的 DrawType 屬性來決定何種類型的轉譯即將發生。
chartObject 必要 Object 是要轉譯之物件。 使用 TypeName 函數來判斷物件的類型。
Cancel 必要 Object 將此物件的 Value 屬性設為 True ,以取消轉譯樞紐分析圖檢視物件。

傳回值

無

範例

下列範例示範擷取 BeforeRender 事件的副程式的語法。

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

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。