WksDocument Object

 

The WksDocument object represents a worksheet document. WksDocument objects are created by the Add or Open methods. Cells within a worksheet are accessed through the Cells, Rows, and Columns methods. The active cell and current selection are accessed through a WksWindow object. You can perform a mathematical transformation on worksheet cells and merge files together with the WksDocument object. The WksRange object can be accessed using the Cells, Rows, Columns, and UsedRange properties.

 

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

 

Properties

DefaultColumnWidth

DefaultFormat

DefaultRowHeight

PageSetup

UsedRange

 

Methods

Cells

Columns

DeleteUnlinkedData

Merge

PrintOut

Range

Rows

Transform

TransformEx2

 

Example

The following script references the WksDocument object.

 

Sub Main

'Declares mvApp as an object

 Dim mvApp As Object

 

'Creates an instance of the MapViewer Application

'object and assigns it to the variable named "mvApp"

 Set mvApp = CreateObject("MapViewer.Application")

 

'Makes MapViewer visible

 mvApp.Visible = True

 

'Declares Wks as an object

 Dim Wks As Object

 

'Creates a worksheet document in MapViewer

'and assigns it to the variable named"Wks"

 Set Wks = mvApp.Documents.Add(mvDocWks)

End Sub