当网页窗口切换了视图类型时发生。
Private Sub application__OnAfterPageWindowViewChange(ByVal pPage As PageWindow)
application 在类模块中以事件方式声明的 Application 类型的对象。
pPage PageWindowEx 对象,其中视图已更改。
下列示例提示用户在窗口的视图模式更改后刷新该窗口。
Private Sub objApp_OnAfterPageWindowViewChange(ByVal pPage As PageWindow)
'Occurs when a view changes
Dim strAns As String
'Prompt user to refresh view
strAns = MsgBox("The view has changed, would you like to refresh the window?", vbYesNo)
If strAns = vbYes Then
pPage.Refresh
End If
End Sub