Private Sub Command1_Click()
DoCmd.OpenForm "透视表", acNormal, "", "", , acNormal
Forms("透视表").TimerInterval = 10
End Sub
Private Sub 命令0_Click()
DoCmd.OpenForm "透视表", acNormal, "", "", , acNormal, "Edit"
End Sub
窗体2代码:
Private Sub btnEdit_Click()
On Error GoTo btnEdit_Err
Me!PivotTable.Verb = acOLEVerbOpen
Me!PivotTable.Action = acOLEActivate
btnEdit_Exit:
Exit Sub
btnEdit_Err:
MsgBox Err.Description
Resume btnEdit_Exit
End Sub
Private Sub Form_Load()
If Me.OpenArgs = "Edit" Then btnEdit_Click
End Sub
Private Sub Form_Timer()
btnEdit_Click
Me.TimerInterval = 0
End Sub 作者: guizhi 时间: 2005-5-14 00:27
谢谢Trynew版主,我想再问一下 :关闭EXCEL之后自动关闭“透视表”窗体返回“打开并刷新窗体”如何实现?