LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Textbox question

Off the drwaing toolbar you get objects unlike the vb objects you are used
to. They are actually shapes. Try this code to see if it is what you want...

Sub test()
Dim txtBox As Shape

Set txtBox = Chart1.Shapes("Text Box 1")

txtBox.DrawingObject.Caption = "Weeee"

End Sub

--
HTH...

Jim Thomlinson


"Vince" wrote:

Jim,
Thanks for the feedback.
I can not add a textbox from the Control Toolbox. When I select the chart,
the Control Toolbox toolbar all goes gray. The only texbox I can get is off
of the drawing toolbar. Do I have a setting wrong in excel or something. I
added a textbox to a worksheet, selected it and see your note about the
"=Embed", but the toolbar is grayed out when I select the chart.

Vince


"Jim Thomlinson" wrote:

What you have should work. A couple of possible problems though. Ensure that
you have a text box off the Control Toolbox toolbar not an edit box off the
forms toolbar. When your sheet is in design mode in the formula bar you
should see the following:

=EMBED("Forms.TextBox.1","")

In the VBE if you type in (Assuming the graph sheet is sheet 2)

Sheet2.

the intelisence dropdown should include "TextBox1" in the list. (you will
not get an intellisence dropdown if you use sheets("Graph"). as the sheet tab
name can change at run time)

Confirm these things and if there is still a problem let me know...
--
HTH...

Jim Thomlinson


"Vince" wrote:

I created a graph and inserted it as a new sheet that is named "Graph". On
this chart, then placed a textbox. I would like to know if there is a way in
VB to update this textbox with the results of calculations that are done
within a VB routine. In VB6 it was simple to do Textbox1.text = "Some Text",
but I don't seem to be able to do the same in VB for Excel. I have tried
Sheets("Graph").textbox1.text, Chart1.textbox1.text, etc but with no luck.
Can someone provide help with this.

Thank you
Vince

 
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
Textbox question browie Excel Discussion (Misc queries) 1 June 13th 05 11:06 PM
Textbox question browie Excel Discussion (Misc queries) 0 June 13th 05 04:00 PM
Textbox question? Greg B Excel Discussion (Misc queries) 2 June 2nd 05 03:56 PM
Textbox question Jorge Rodrigues[_2_] Excel Programming 4 November 13th 04 11:08 PM
textbox question dok112[_22_] Excel Programming 1 August 10th 04 07:54 AM


All times are GMT +1. The time now is 03:41 AM.

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

About Us

"It's about Microsoft Excel"