Drawings.SetActiveSheet (Sheet) Method

Sets a sheet as the active one.
Public Sub SetActiveSheet( _ 
ByVal sheet As Sheet
)
This language is not supported or no code example is available.
public void SetActiveSheet( 
Sheet sheet 
)
This language is not supported or no code example is available.

Parameters

sheet
Sheet

The Sheet to set as active.

Exception type Condition

EyeshotException

Thrown when the element does not exist in the collection.

Remarks
 

When a Sheet is set as active, the following changes happen:

- The entities of the current ActiveSheet are cleared.

- The entities of the Drawings are moved to the current ActiveSheet.

- The Sheet is set as ActiveSheet and its entities are moved to the Drawings.

Since the drawings collection is modified, this method can't be called in a Foreach loop.

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition