In Visual Basic, control elements such as textboxes seem to act like objects, and therefore if I assign a variable to such an element, it seems to be assigned by reference. For example:
TextBox1.Text = "old text"
Dim ctrlEl as Object = TextBox1
ctrlEl.Text = "new text"
Debug.print(TextBox1.Text)
'prints "new text"
However, if I assign any particular property of that control, it seems to be assigned by value. Like this:
TextBox1.Text = "old text"
Dim ctrlElText as Object = TextBox1.Text
ctrlElText = "new text"
Debug.print(TextBox1.Text)
'prints "old text"
But what I need is to assign ctrlElText to TextBox1.Text by reference, so that modifying ctrlElText would update the TextBox1.Text as well. How can I do that?