Posted to microsoft.public.excel.programming
|
|
Excel 2007 Text Box
Hello,
It does work on the embedded chart, but not on a chart that has been moved
to a new sheet. I can't seem to place the text box below the x axis in this
case.
Bill
"Jon Peltier" wrote in message
...
The textbox within the embedded chart works as expected if the textbox
does not line wrap.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
"Jon Peltier" wrote in message
...
Well, it doesn't look fixed to me. I ran this short procedure on an
embedded chart:
Sub ChartTextBox()
With ActiveChart.Shapes.AddTextbox(msoTextOrientationHo rizontal, _
0, ActiveChart.ChartArea.Height, 100, 12)
.TextFrame.Characters.Text = "Testing text box position"
End With
End Sub
and the resulting textbox, which in 2003 would have butted against the
bottom of the chart, instead extended below the chart. It was line
wrapped like this
Testing text box
position
with the top 2/3 of the first line in the chart, and the rest showing
below it.
When I ran the same procedure on a chart sheet, the textbox was created
above the lower axis. Inserting this line before End With did not move
the textbox:
.Top = ActiveChart.ChartArea.Height
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
"Nick Hodge" wrote in message
...
Bill
I believe that was broken in all beta releases, it is now fixed on RTM
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk
"Bill" wrote in message
ink.net...
Hello,
I am trying to add a text box to the bottom left portion of a chart
using Excel 2007 (the trial version downloaded from Microsoft). I
could do this with Excel 2003 using the following code:
Chheight = ActiveChart.ChartArea.Height
Chtleft = ActiveChart.ChartArea.Left
ActiveChart.TextBoxes.Add(Chtleft, Chheight, 10, 10).Select
Selection.Characters.Text = "This is my text"
Selection.autosize = true
With Excel 2007, it will not place the text box below the x axis, no
matter what value I put in for Chheight. And, I get an error message
when trying to autosize the text box.
Any ideas? Thanks,
Bill
|