Hopefully this will be an easy question. I need to find out how to pass controls, an example is below.
I am trying to be a better programmer, and I need to do this in order to make my code as OO as possible. I know I also need to stop using the "public function", but I will get into passing functions byRef another day. Unless you have a hint for me (hint hint). Anyway, any help you could give me would be appreciated. Thank you. The hardest questions always have the easiest answers.
Code:
Private Sub Text1_Click()
Dim aControl As control
aControl = Text1
moveControl (aControl)
End Sub
Public Function moveControl(aControl As control)
aControl.Left = 0
End Function