Share via


Panes Property

Returns the Panes collection for the specified worksheet.

expression.Panes

*expression   * Required. An expression that returns a Window object.

Remarks

For information about returning a single member of a collection, see Returning an Object from a Collection .

Example

This example sets a variable for the visible range in the specified pane and displays the range's location.

Sub SetVisibleRange()

   Dim rngVisible

   Set rngVisible = Spreadsheet1.ActiveSheet.Panes(1).VisibleRange

   MsgBox "rngVisible.Address " & vr.Address

End Sub

Applies to | Window Object