Dim y As Integer
Private Sub Command1_Click()
Dim x As Integer
x = 2
Text1.Text = fun2(fun1(x), y)
Text2.Text = fun1(x)
End Sub
Private Function fun1(x As Integer) As Integer
x = x y: y = x y
fun1 = x y
End Function
Private Function fun2(x As Integer, y As Integer) As Integer
fun2 = 2 * x y
End Function