T
tenlbham
I am writing a macro that will insert text & a cell value into a similarly
named text box within multiple charts, but being a noob with VBA, I'm not
sure of the syntax to use to select the text box in question. I was starting
with a simple bit of code that did the same thing for the ChartTitle:
ActiveChart.ChartTitle.Select
Selection.Characters.Text = "text here" & <value>
I tried to use:
ActiveChart.TextBoxes("Text Box 1").Select
Selection.Characters.Text = "text here" & <value>
.... as well as trying it a few other ways, but keep getting the error
"Method 'TextBoxes' of object '_Chart failed"
What am I missing?
Thank you!
named text box within multiple charts, but being a noob with VBA, I'm not
sure of the syntax to use to select the text box in question. I was starting
with a simple bit of code that did the same thing for the ChartTitle:
ActiveChart.ChartTitle.Select
Selection.Characters.Text = "text here" & <value>
I tried to use:
ActiveChart.TextBoxes("Text Box 1").Select
Selection.Characters.Text = "text here" & <value>
.... as well as trying it a few other ways, but keep getting the error
"Method 'TextBoxes' of object '_Chart failed"
What am I missing?
Thank you!