Change text in textbox in chart in Excel 2007

S

Stratuser

After I changed from Excell 2003 to Excel 2007, the following VBA code, which
changed the date in a textbox in a chart, no longer worked:

Sheets("All Styles").Select
ActiveChart.Shapes("Text Box 1026").Select
Selection.Characters.Text = Range("Date").Value

The macro recorder doesn't record anything when I try to use it to get some
code. Any ideas for fixing this?
 
H

Herbert Seidenberg

Excel 2007 Shape Text
Sub Textbox()
Dim d As Date
With Sheets("Summary")
d = .Range("DDate")
With .ChartObjects(1).Chart.Shapes(1).TextEffect
.FontSize = 12
.FontBold = True
.Text = d
End With
End With
End Sub
 
L

Lee Ott

I am having the same problem.
After I changed from Excell 2003 to Excel 2007, the following VBA code, which
changed the date in a textbox in a chart, no longer worked:

Sheets("All Styles").Select
ActiveChart.Shapes("Text Box 1026").Select
Selection.Characters.Text = Range("Date").Value

The macro recorder does not record anything when I try to use it to get some
code. Any ideas for fixing this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top