WksStatistics Object
The WksStatistics object holds results calculated by the WksRange Statistics method. Once calculated, the statistics stored in this object do not change, even if the cells in the source WksRange change.
Properties
Example
The following script demonstrates how the WksStatistics object is used in reference to the WksRange object.
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
'Assigns the Documents collection to the
'variable named "Docs"
Set Docs = GrapherApp.Documents
'Opens a worksheet document in Grapher and
'assigns it to the variable named "Wks"
Set Wks = Docs.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)
'Uses the WksRange object statistics method
'to store statistics
Set Stats = WksRange.Statistics(True, True, wksStatsAll)
End Sub