搞不懂 sub,Function 区别
搞不懂 sub,Function 区别function func(a as integer,b as integer)
return a^b
end function
用 sub 能写不
一般情况下SUB过程是不返回值的,但一样也可以让SUB带回一个值,BYREF传一个变量过去就行了。。。
Dim x As Integer
Call getms(2, 5, x)
MsgBox(x)
Sub getms(ByVal x As Integer, ByVal y As Integer, ByRef sum As Integer)
sum = x * y
End Sub