I am looking for a way to transfer data between two different sheets. All are ActiveX controls. On Sheet1 there is a textbox and a button. On Sheet2 there is another textbox. When the button is pushed on Sheet1, it should take the string in textbox1 and copy it to the text box on Sheet2. Nothing happens when the button is pushed (the text in textbox2 does not change). To simplify the debugging, I have simplified the VBA (simple "mary" constant string) to try the following [test.xlsm - Sheet1 (Code) ]:
No change in textbox2 ("mary" did not appear in textbox2 and no debugging/compile error either). It works when the copying is done all on the same sheet.
Will eventually like to change to:
Private Sub btnPerson_Click()
Sheet2.OLEObjects("tbBox2").Object.Text = "mary"
End Sub
Have also tried:
Private Sub btnPerson_Click()
Worksheets("Sheet2").OLEObjects("tbBox2").Object.Text = "mary"
End Sub
Sheet2.OLEObjects("tbBox2").Object.Text = tbBox1.Text