PC Review


Reply
Thread Tools Rate Thread

2 different fonts in chart title?

 
 
=?Utf-8?B?ZmFiZXJr?=
Guest
Posts: n/a
 
      3rd Sep 2007
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 With Quote
 
 
 
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      3rd Sep 2007
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 With Quote
 
=?Utf-8?B?ZmFiZXJr?=
Guest
Posts: n/a
 
      4th Sep 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 fonts in Chart title in E2007 J Streger Microsoft Excel Programming 5 26th Jan 2010 10:41 AM
How to hide a chart title, but keep the title in the chart KBratt Microsoft Excel Charting 1 16th Jul 2009 12:13 AM
Access Chart Title and Axis title and Legend iccsi Microsoft Access Reports 1 16th Dec 2008 01:22 PM
Pasting Objects into Chart title and Axis title =?Utf-8?B?U2Ft?= Microsoft Excel Charting 1 6th Jun 2005 08:50 PM
Aligning title, legend, x axis title on chart Ann Scharpf Microsoft Excel Charting 1 11th Nov 2003 06:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:32 PM.