text box reference
Hello,
Instead of referencing my form text box to a cell on the active sheet(see code below which works): Private Sub UserForm_Activate() TextBox1.Text = ActiveSheet.Range("ag11").Value End Sub I am trying to reference it to a text box on the sheet. However, the following code does not work: Private Sub UserForm_Activate() TextBox1.Text = ActiveSheet.Shapes("Text Box 62").Text End Sub It gives me a run time error 438 (object does not support thisproperty or method). Any idea. Thanks |
text box reference
Private Sub UserForm_Activate()
TextBox1.Text = ActiveSheet.TextBoxes("Text Box 62").Text End Sub Text Box 62 would be consistent with a Textbox from the Drawing toolbar demo the objects from the immediate window: ? activeSheet.Textboxes("Text Box 62").Text This is my text -- Regards, Tom Ogilvy "Caroline vincent" wrote in message ... Hello, Instead of referencing my form text box to a cell on the active sheet(see code below which works): Private Sub UserForm_Activate() TextBox1.Text = ActiveSheet.Range("ag11").Value End Sub I am trying to reference it to a text box on the sheet. However, the following code does not work: Private Sub UserForm_Activate() TextBox1.Text = ActiveSheet.Shapes("Text Box 62").Text End Sub It gives me a run time error 438 (object does not support thisproperty or method). Any idea. Thanks |
text box reference
try this:
ActiveSheet.Shapes("Text Box 62").Select TextBox1.Text = Selection.Text -----Original Message----- Hello, Instead of referencing my form text box to a cell on the active sheet(see code below which works): Private Sub UserForm_Activate() TextBox1.Text = ActiveSheet.Range("ag11").Value End Sub I am trying to reference it to a text box on the sheet. However, the following code does not work: Private Sub UserForm_Activate() TextBox1.Text = ActiveSheet.Shapes("Text Box 62").Text End Sub It gives me a run time error 438 (object does not support thisproperty or method). Any idea. Thanks . |
text box reference
Thanks it works
-----Original Message----- Hello, Instead of referencing my form text box to a cell on the active sheet(see code below which works): Private Sub UserForm_Activate() TextBox1.Text = ActiveSheet.Range("ag11").Value End Sub I am trying to reference it to a text box on the sheet. However, the following code does not work: Private Sub UserForm_Activate() TextBox1.Text = ActiveSheet.Shapes("Text Box 62").Text End Sub It gives me a run time error 438 (object does not support thisproperty or method). Any idea. Thanks . |
All times are GMT +1. The time now is 11:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com