Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 2 different fonts in chart title?

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 2 different fonts in chart title?

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

--
HTH,
Barb Reinhardt



"faberk" wrote:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 2 different fonts in chart title?

U rock Barb :) thanks...

"Barb Reinhardt" wrote:

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

--
HTH,
Barb Reinhardt



"faberk" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to hide a chart title, but keep the title in the chart KBratt Charts and Charting in Excel 1 July 16th 09 12:13 AM
Dynamic Chart Title With 3D Stacked Column Chart Thomas M. Charts and Charting in Excel 2 March 23rd 09 03:14 PM
Changing File Title Fonts bob in calif Excel Discussion (Misc queries) 3 April 17th 08 06:15 PM
Excel chart - how to assign the file name in the chart title? TGreen Charts and Charting in Excel 1 August 16th 05 10:35 AM
Pasting Objects into Chart title and Axis title Sam Charts and Charting in Excel 1 June 6th 05 08:50 PM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"