Referring to a TextBox
Hi
I would like to be able to select text in a textbox for editing, based
on the selection of a worksheet cell.
e.g. selecting K4 means edit TextBox1
selecting K5 means edit TextBox2 and so on.
Using Textboxes from the Control Toolbox, I know that this works:
ActiveSheet.EditBox.Text = ActiveSheet.TextBox1.Text
(The text that needs editing is placed into a special edit textbox.)
I have tried a number of variations of the following without success:
Sub TestLoad()
Dim F1 As TextBox
Set F1.Name = "TextBox" & "2"
ActiveSheet.EditBox.Text = ActiveSheet.F1.Text
End Sub
How can I 'build' the textbox name to achieve what I would like ?
Any help appreciated.
Andrew B
|