Application.WindowBeforeViewChange event (Project)

Occurs when the top pane view is changed within a window in Project.

Syntax

expression. WindowBeforeViewChange( _Window_, _prevView_, _newView_, _projectHasViewWindow_, _Info_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Window Required Window The window where the view change occurs.
prevView Required View 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 Required View The new view (top pane) to which the user is trying to change.
projectHasViewWindow Required Boolean True if the Project View Bar is currently visible.
Info Required EventInfo EventInfo.Cancel is 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.

Return value

Nothing

Remarks

Project events don't occur when the project is embedded in another document or application.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.