?? clsstatistic.cls
字號:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "clsStatistic"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Dim fAve As Single
Dim fMax As Single
Dim fMin As Single
Public Function GetAverage(fData() As Single, RowCount As Integer) As Single
Dim i As Integer
Dim dSum As Double
For i = 1 To RowCount
dSum = dSum + fData(i)
Next i
GetAverage = dSum / RowCount
End Function
Public Function GetMax(fData() As Single, RowCount As Integer) As Single
Dim i As Integer
fMax = fData(1)
For i = 1 To RowCount
If fMax < fData(i) Then
fMax = fData(i)
End If
Next i
GetMax = fMax
End Function
Public Function GetMin(fData() As Single, RowCount As Integer) As Single
Dim i As Integer
fMin = fData(1)
For i = 1 To RowCount
If fMin > fData(i) Then
fMax = fData(i)
End If
Next i
GetMin = fMin
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -