Syntax

expression.ActivePane

expression A variable that represents a Window object.

Remarks

This property can be used only on worksheets and macro sheets.

This property returns a Pane object. You must use the property to obtain the index of the active pane.

Example

This example activates the next pane of the active window in Book1.xls. You cannot activate the next pane if the panes are frozen. The example must be run from a workbook other than Book1.xls. Before running the example, make sure that Book1.xls has either two or four panes in the active worksheet.

Visual Basic for Applications
Workbooks("BOOK1.XLS").Activate If not ActiveWindow.FreezePanes Then With ActiveWindow i = .ActivePane.Index If i = .Panes.Count Then .Panes(1).Activate Else .Panes(i+1).Activate End If End With End If
active pane Active Pane Property ActivePane activepane property How do I refer to the active pane in a window? How does my program address the active window pane? Return the active pane in a multipane view.

See also: