2 different fonts in chart title?

G

Guest

Is it possible to define a different font to each line in a chart title?
Here is the code I'm using to assign the value to the chart title text:

ActiveChart.ChartTitle.Text = "Pre-shipment Inspection Faults" &
vbLf & _
rst.Fields(0).Value & ": " & rst.Fields(1).Value
 
G

Guest

How about something like this?

Title1 = "New Title1"
Title2 = "New Title2"
Title = Title1 & Chr(10) & Title2
ActiveChart.ChartTitle.Text = Title
With ActiveChart.ChartTitle.Text
With .Characters(Start:=1, Length:=Len(Title1)).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 20
End With
With .Characters(Start:=Len(Title1) + 1, Length:=Len(Title)).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
End With
End With
 
G

Guest

U rock Barb :) thanks...

Barb Reinhardt said:
How about something like this?

Title1 = "New Title1"
Title2 = "New Title2"
Title = Title1 & Chr(10) & Title2
ActiveChart.ChartTitle.Text = Title
With ActiveChart.ChartTitle.Text
With .Characters(Start:=1, Length:=Len(Title1)).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 20
End With
With .Characters(Start:=Len(Title1) + 1, Length:=Len(Title)).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
End With
End With
 

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