Active Property
Returns whether the specified pane or window is active. Read-only MsoTriState.
MsoTriState can be one of these MsoTriState constants. |
msoCTrue |
msoFalse |
msoTriStateMixed |
msoTriStateToggle |
msoTrue The specified pane or window is active. |
expression.Active
expression Required. An expression that returns of the objects in the Applies To list.
Example
This example checks to see if the presentation file "test.ppt"
is in the active window. If not, it saves the name of the presentation that is currently active in the variable oldWin
and activates the "test.ppt"
presentation.
With Application.Presentations("test.ppt").Windows(1)
If Not .Active Then
Set oldWin = Application.ActiveWindow
.Activate
End If
End With