Sub Tukar(ByRef x As Single, ByRef y As Single)
Dim Temp As Single
Temp = x
x = y
y = Temp
End Sub
Private Sub cmdTukar_click()
Dim x As Single, y As Single
x = TxtX.Text: y = TxtY.Text
Tukar x, y
TxtX.Text = x: TxtY.Text = y
End Sub
0 comments:
Post a Comment