Chart Title entering text VBA

  • Thread starter Thread starter infojmac
  • Start date Start date
I

infojmac

Hi,

Hope someone can help;

At work we import a large number of textfiles which when imported int
excel are graphed. We get the titles from the textfiles and this i
fine for all but one file. What i want to do is edit the chart title t
add text after it has imported. However the first part is variable.

So in summary i want the chart title as it is, but then to add tex
afterwards to the existing title. Is this possible?

so "Graph ????" is the title but i want to make it "Graph ????: tes
text"

The below obviously just completely changes the title.

Sheets("Asthma Graph").Select
With Selection
.ChartTitle.Text = “Test text”
End With

Thank Yo
 
Hi,

You can use the existing text and append the new text to it.

With Selection
.ChartTitle.Text = .charttitle.text & “: Test text”
End With

Cheers
Andy
 
Back
Top