WindowBeforeViewChange Event
Occurs when the top pane view is changed within a window in Project.
Syntax
Private Sub object_WindowBeforeViewChange(ByVal Window As MSProject.Window, ByVal prevView As MSProject.View, ByVal newView As MSProject.View, ByVal projectHasViewWindow As Boolean, Info As MSProject.EventInfo)
object An object of type Application declared with events in a class module. For more information, see Using events with the Application object.
Window The window where the view change occurs.
prevView The previous view (top pane) the user is in. If the user was not in a project view before applying the current view, this value will return Null.
newView The new view (top pane) to which the user is trying to change.
projectHasViewWindow True if the Project View Bar is currently visible.
Info**.Cancel** False when the event occurs. If the event procedure sets this argument to True, the value for the field specified with Field is not changed.
Remarks
Project events do not occur when the project is embedded in another document or application.
Applies to | Application Object
See Also | WindowSelectionChange Event | WindowViewChange Event