How to pass Form TextBox reference to method?
Following code is issuing exception.
Private Sub DoSmthWithTextBox(ByRef txtBox as TextBox)
txtBox.BackColor = vbRed
End Sub
Private Sub TextBox1_Change()
DoSmthWithTextBox Me.TextBox1
End Sub
Problem appears when'DoSmthWithTextBox Me.TextBox1' passes string from TextBox1 insead of object reference. How to pass TextBox object to method DoSmthWithTextBox?
Thanx