Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
joe joe is offline
external usenet poster
 
Posts: 62
Default 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
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text Reference Stretch_34 Excel Discussion (Misc queries) 1 September 8th 09 05:12 PM
Cell reference within text? orcini Excel Discussion (Misc queries) 3 December 26th 08 06:16 PM
How do I put text and a cell reference in a text box? Sarah Lefevre Excel Discussion (Misc queries) 3 September 15th 06 12:57 PM
Reference date as text systemx Excel Worksheet Functions 3 January 25th 06 12:48 AM
How can I reference data or text within a text box to a cell in Ex BB Excel Discussion (Misc queries) 2 January 25th 05 07:55 PM


All times are GMT +1. The time now is 01:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"