CLR wrote...
This code will get the text from a Text Box to a helper cell on the same
sheet.....then that cell can be linked to whatever sheet you want.....
Sub TextBoxToCell()
Range("a1").Value = [Text box 1].Text
End Sub ...
I am simply attempting to make a cell on the 2nd sheet of a workbook
automatically equal the value of a text box on the 1st sheet that is
used as an input page for the user to input data. None of the data is
used in any calculations. It is simply for header information and
descriptions.
It'd be a lot less trouble just to set the Linked Cell property of the
text box to the address of the cell that should contain its text.
Also, the macro above would fail for many reasons. First, spaces are
NEVER allowed in the names of controls. You may believe they add
'readability', but in this case that questionable belief is trumped by
implying functionality that just doesn't exist.
Next, OLE controls are specific to worksheets, so the only way the Text
property above works is when the containing the text box is the active
worksheet when the macro runs, in which case it'd put the .Text into
the *same* worksheet's A1 cell, so not much use when .Text should be
put into a cell in a different worksheet.
Finally, this may be due to an Excel version difference, but Excel 10
(XP) requires [TextBox1].Object.Text rather than [TextBox1].Text.