Function test(a As Integer)'構造函數名字為test參數為a且為int型
If a >= 90 Then
Debug.Print "優秀"
test = "優秀" '賦值到單元格,跨表依然適用
ElseIf a >= 60 Then
Debug.Print "及格"
test = "及格"
Else
Debug.Print "不及格"
test = "不及格"
End If
End Function