[讨论]用户定义类型为定义
Private Sub cmdStart_Click()
If "正式" = Mid(frmSceond.Caption, 1, 2) Then
txtS1.Text = Int(Average(Salary2(), 8) * 100) / 100
ElseIf "临时" = Mid(frmSecond.Caption, 1, 2) Then
txtS1.Text = Int(Average(Salary1(), 5) * 100) / 100
End If
End Sub
Private Function Average(Stuarray() As Single, n As lnteger) As Single
Dim i As Integer
Dim aver As Single, sum As Single
ReDim strarry(n)
For i = 1 To n - 1
sum = sum + Stuarray(i)
Next
aver = sum / n
Average = aver
End Function
帮我看看这个有什么问题?系统提示:用户定义类型为定义