WksRange Object
The WksRange object reautomation:objects:presents one or more cells within a worksheet. Methods exist to copy the cells, change cell formatting, sort columns, and calculate column statistics.
Properties
Methods
Example
The following script demonstrates how the WksRange object is used in reference to the Columns property.
Sub Main
'Declares GrapherApp as an object
Dim GrapherApp As Object
'Creates an instance of the Grapher Application
'object and assigns it to the variable named "GrapherApp"
Set GrapherApp = CreateObject("Grapher.Application")
'Makes Grapher visible
GrapherApp.Visible = True
'Declares Wks as an object
Dim Wks As Object
'Opens a worksheet document in Grapher and
'assigns it to the variable named "Wks"
Set Wks = GrapherApp.Documents.Open(GrapherApp.Path + "\Samples\bar chart orientations.dat")
'Declares WksRange as an object
Dim WksRange As Object
'Assigns columns A, B, and C to the variable
'named "WksRange"
Set WksRange = Wks.Columns(1, 3)
End Sub