Activate Method
As it applies to the Pane object.
Activates the pane. If the pane isn't in the active window, the window that the pane belongs to will also be activated.
Syntax
expression.Activate()
*expression * Required. An expression that returns one of the objects in the Applies To list.
As it applies to the Project object.
Activates the object, making this project the active project.
Syntax
expression.Activate()
*expression * Required. An expression that returns one of the objects in the Applies To list.
As it applies to the Window object.
Activates the object, bringing the window to the front of the z-order.
Syntax
expression.Activate()
*expression * Required. An expression that returns one of the objects in the Applies To list.
Example
As it applies to the Project object.
The following examples activate the next and previous projects, respectively.
Sub ProjectNext()
If ActiveProject.Index < Projects.Count Then
Projects(ActiveProject.Index + 1).Activate
Else
Projects(1).Activate
End If
End Sub
Sub ProjectPrevious()
If ActiveProject.Index > 1 Then
Projects(ActiveProject.Index - 1).Activate
Else
Projects(Projects.Count).Activate
End If
End Sub
Applies to | Pane Object | Project Object, Projects Collection Object | Window Object, Windows Collection Object
See Also | Close Method | Deactivate Event | NewProject Event | Open Event | WindowActivate Method