Class Pane (Excel VBA)

The class Pane represents a pane of a window.

The main procedure of class Pane is Activate

Set

To use a Pane class variable it first needs to be instantiated, for example

Dim pan as Pane
Set pan = ActiveWindow.ActivePane

The following procedures can be used to set variables of type Pane: Panes.Item, Window.ActivePane and Window.Panes

For Each

Here is an example of processing the Pane items in a collection.

Dim pan As Pane
For Each pan In Application.Panes
	
Next pan

Methods

This is the main method of the Pane class

Activate - Activates the pane.

Dim booActivate As Boolean
booActivate = ActiveWindow.ActivePane.Activate()

Other Methods

LargeScroll - Scrolls the contents of the window by pages.

PointsToScreenPixelsX - Returns or sets a pixel point on the screen.

PointsToScreenPixelsY - Returns or sets the location of the pixel on the screen.

ScrollIntoView - Scrolls the document window so that the contents of a specified rectangular area are displayed in either the upper-left or lower-right corner of the document window or pane (depending on the value of the Start argument).

SmallScroll - Scrolls the contents of the window by rows or columns.

Properties

Index returns a Long value that represents the index number of the object within the collection of similar objects.

Parent returns the parent object for the specified object. Read-only.

ScrollColumn returns or sets the number of the leftmost column in the pane or window.

ScrollRow returns or sets the number of the row that appears at the top of the pane or window.

VisibleRange 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.

Panes.Count returns a Long value that represents the number of objects in the collection.

Panes.Item returns a single object from a collection.

Panes.Parent returns the parent object for the specified object. Read-only.