Partager via


WorksheetBase.ScrollArea Property

Definition

Gets or sets the range where scrolling is allowed, as an A1-style range reference.

public:
 property System::String ^ ScrollArea { System::String ^ get(); void set(System::String ^ value); };
public string ScrollArea { get; set; }
member this.ScrollArea : string with get, set
Public Property ScrollArea As String

Property Value

The range where scrolling is allowed, as an A1-style range reference.

Examples

The following code example uses the ScrollArea property to set the scroll area of the current worksheet to the range of cells from A1 to Z100.

This example is for

a document-level customization.

private void SetScrollArea()
{
    this.Range["A1", "Z100"].Value2 = "X";
    this.ScrollArea = "A1:Z100";
}
Private Sub SetScrollArea()
    Me.Range("A1", "Z100").Value2 = "X"
    Me.ScrollArea = "A1:Z100"
End Sub

Remarks

Cells outside the scroll area cannot be selected.

Set this property to an empty string ("") to enable cell selection for the entire sheet.

Applies to