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 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
'Opens a worksheet document in MapViewer and
'assigns it to the variable named "Wks"
Set Wks = mvApp.Documents.Open(FileName:=mvApp.ApplicationFolder + _
"\Samples\co2010.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(Col1:=1, Col2:=3)
'Uses the WksRange object statistics method
'to store statistics
Set Stats = WksRange.Statistics(Sample:=True, _
Header:=True, Flags:=wksStatsAll)
End Sub