WksWindow Object

The WksWindow object represents a single worksheet document window.

Derived from: Window object(All methods and properties of Window apply to this object.)

The following table provides all properties of the WksWindow object :

Property

Description

ActiveCell

Returns/sets the active cell location.

LeftColumn

Returns/sets the first visible column in the window.

Selection

Returns/sets the window's selected Range. Returns null if nothing is selected.

TopRow

Returns/sets the first visible row in the window.

Example

The following script demonstrates how the WksWindow object is used in reference to the Windows collection.

Sub Main

 

'Declares SurferApp as an object

Dim SurferApp As Object

 

'Creates an instance of the Surfer Application object and assigns it

'to the variable named "SurferApp"

Set SurferApp = CreateObject("Surfer.Application")

 

'Makes Surfer visible

SurferApp.Visible = True

 

'Declares Wks as an object

Dim Wks As Object

 

'Creates a worksheet document in Surfer and assigns it to the variable

'named "Wks"

Set Wks = SurferApp.Documents.Add(srfDocWks)

 

'Declares WksWindow as an object

Dim WksWindow As Object

 

'Assigns the new plot window to the variable named "WksWindow"

Set WksWindow = Wks.NewWindow

 

End Sub