OnAfterPageWindowViewChange Event
Occurs when a page window has switched view types.
Private Sub expression_OnAfterPageWindowViewChange(ByVal pPage As PageWindowEx)
expression An object of type Application declared using the WithEvents keyword in a class module.
pPage The PageWindowEx object in which the view has changed.
Example
The following example prompts the user to refresh the window after it has changed view modes.
Private Sub objApp_OnAfterPageWindowViewChange(ByVal pPage As PageWindowEx)
'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