vb基础问题

2024-11-15 10:45:35
推荐回答(1个)
回答1:

Sub无返回结果,Function可以返回结果
比如:
Sub AA(a as integer)
a=5
Print "a=" & a
End Sub

Function BB(b as Integer) As integer
b=6
BB=b
End Function

Private Sub Command1_Click()
call AA '调用子过程AA
Print
Print "b=" BB '调用子过程BB后再返回BB的值
End Sub