Private Sub n(ByVal x As Integer, ByVal y As Integer) If x > y Then n = x Else n = yEnd Subsub调用函数不可引用,即n只是函数,不能做为变量改为:Private function n(ByVal x As Integer, ByVal y As Integer) as interger If x > y Then n = x Else n = yEnd Sub