A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Excel Chart Title



 
 
Thread Tools Display Modes
  #1  
Old August 4th, 2009, 02:21 AM posted to microsoft.public.excel.charting
nzadmin
external usenet poster
 
Posts: 1
Default Excel Chart Title

I'm using excel 2007 Service Pack 2.

Trying to change part of the chart title. No problem in previous versions of
Exel.
Now the whole Title changes - not just part of it. Following is sample code:


Sub test()

Workbooks("Book1.xlsx").Activate
Charts("Chart1").Select

Title1 = "New Title1"
Title2 = "New Title2"
Title = Title1 & Chr(10) & Title2
ActiveChart.ChartTitle.Text = Title

ActiveChart.ChartTitle.Select

With ActiveChart.ChartTitle
With .Characters(Start:=1, Length:=Len(Title1)).Font
.Name = "Arial"
.FontStyle = "Normal"
.Size = 20
End With

With .Characters(Start:=Len(Title1) + 1, Length:=Len(Title2)).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
End With
End With

End Sub

  #2  
Old August 4th, 2009, 10:19 AM posted to microsoft.public.excel.charting
Andy Pope
external usenet poster
 
Posts: 2,088
Default Excel Chart Title

Hi,

This is a known bug in 2007.
Work around is to use a textbox.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"nzadmin" wrote in message
...
I'm using excel 2007 Service Pack 2.

Trying to change part of the chart title. No problem in previous versions
of
Exel.
Now the whole Title changes - not just part of it. Following is sample
code:


Sub test()

Workbooks("Book1.xlsx").Activate
Charts("Chart1").Select

Title1 = "New Title1"
Title2 = "New Title2"
Title = Title1 & Chr(10) & Title2
ActiveChart.ChartTitle.Text = Title

ActiveChart.ChartTitle.Select

With ActiveChart.ChartTitle
With .Characters(Start:=1, Length:=Len(Title1)).Font
.Name = "Arial"
.FontStyle = "Normal"
.Size = 20
End With

With .Characters(Start:=Len(Title1) + 1, Length:=Len(Title2)).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
End With
End With

End Sub


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.