#1   Report Post  
Posted to microsoft.public.excel.charting
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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,489
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


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
How do I put title on top of chart already made in Excel? Angel Childre Charts and Charting in Excel 1 March 13th 07 04:39 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
Excel Chart y-axis title Kuzemdoo Dawuni Excel Discussion (Misc queries) 1 December 3rd 04 02:43 AM


All times are GMT +1. The time now is 05:36 AM.

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"