Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to set the text in a textbox in a chart object with VBA?

I've a textbox I wish to fill programmatically on a chart. I can get to the
Shape object I need and when viewing this in the locals window there's a
DrawingObject property which you cannot get at via VBA. If I can get a hold
of this object I can change the text, but I just cannot find a way of
procuring an appropriate object!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default How to set the text in a textbox in a chart object with VBA?

Option Explicit

Sub addtext()
Dim ch As ChartObject
Set ch = Sheet1.ChartObjects(1)
With ch.Chart.TextBoxes.Add(193, 121, 26, 14)
.Select
.AutoSize = True
.Text = "hello"
End With
End Sub


"DHB7" wrote in message
...
I've a textbox I wish to fill programmatically on a chart. I can get to
the
Shape object I need and when viewing this in the locals window there's a
DrawingObject property which you cannot get at via VBA. If I can get a
hold
of this object I can change the text, but I just cannot find a way of
procuring an appropriate object!


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
How to set a textbox to be a print object Jeff Donkersgoed Excel Programming 0 April 29th 08 04:15 PM
Change text in Textbox on Chart? Matt Williamson Charts and Charting in Excel 3 January 5th 08 04:34 AM
Change text in Textbox on Chart? Matt Williamson Excel Programming 3 January 5th 08 04:34 AM
limiting rows of text in a textbox object? mark Excel Worksheet Functions 1 May 19th 06 08:06 PM
Highlight all Text in a Textbox when the textbox is selected RPIJG[_73_] Excel Programming 3 October 28th 05 08:28 PM


All times are GMT +1. The time now is 05:48 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"