Share via


Pane.VisibleRange Property

Excel Developer Reference

Returns a Range object that represents the range of cells that are visible in the window or pane. If a column or row is partially visible, it's included in the range. Read-only.

Syntax

expression.VisibleRange

expression   A variable that represents a Pane object.

Example

This example displays the number of cells visible on Sheet1.

Visual Basic for Applications
  Worksheets("Sheet1").Activate
MsgBox "There are " & Windows(1).VisibleRange.Cells.Count _
    & " cells visible"

See Also