Public Function f22(ByRef fx As Integer, ByRef fy As Integer) As Integer
f22 = fx + fy
fx = 10
fy = 20
End Function
Public Sub tst22()
Dim x As Integer: Dim y As Integer
x = 1
y = 1
Debug.Print f22(x, y), x, y
'мы вернули аж три значения f22, x , y
' 2 10 20
End Sub
|