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

We are tranferring code from 2003 to 2007 and noticed a change in how VBA
reads the following line:

ActiveChart.ChartTitle.Characters(5,2).Font.Color = vbred

IN 2003, it reads it correctly coloring letters 5 & 6 red.
in 2007, it colors the whole Chart title red.

It seems that regardless of the start and length I pass into the characters
function, the formatting occurs to the entire chart title, not just the
characters I wanted.

Even recording the VBA in 2007 yields no help as it cannot record the
partial font change, even though the GUI allows it. IN 2003 you can record
the partial font change.

Any ideas on what's happening here?


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 2 fonts in Chart title in E2007

It works for me in 2007, post your actual code.

Regards,
Peter T

"J Streger" wrote in message
...
We are tranferring code from 2003 to 2007 and noticed a change in how VBA
reads the following line:

ActiveChart.ChartTitle.Characters(5,2).Font.Color = vbred

IN 2003, it reads it correctly coloring letters 5 & 6 red.
in 2007, it colors the whole Chart title red.

It seems that regardless of the start and length I pass into the
characters
function, the formatting occurs to the entire chart title, not just the
characters I wanted.

Even recording the VBA in 2007 yields no help as it cannot record the
partial font change, even though the GUI allows it. IN 2003 you can record
the partial font change.

Any ideas on what's happening here?


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 2 fonts in Chart title in E2007

pasted the code in the immediate window and it turned the entire title font color to
red.

--


Gary Keramidas
Excel 2003


"Peter T" <peter_t@discussions wrote in message
...
It works for me in 2007, post your actual code.

Regards,
Peter T

"J Streger" wrote in message
...
We are tranferring code from 2003 to 2007 and noticed a change in how VBA
reads the following line:

ActiveChart.ChartTitle.Characters(5,2).Font.Color = vbred

IN 2003, it reads it correctly coloring letters 5 & 6 red.
in 2007, it colors the whole Chart title red.

It seems that regardless of the start and length I pass into the characters
function, the formatting occurs to the entire chart title, not just the
characters I wanted.

Even recording the VBA in 2007 yields no help as it cannot record the
partial font change, even though the GUI allows it. IN 2003 you can record
the partial font change.

Any ideas on what's happening here?


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 2 fonts in Chart title in E2007

not much consolation, but it works correctly in 2010.

--

Gary Keramidas
Excel 2003


"J Streger" wrote in message
...
We are tranferring code from 2003 to 2007 and noticed a change in how VBA
reads the following line:

ActiveChart.ChartTitle.Characters(5,2).Font.Color = vbred

IN 2003, it reads it correctly coloring letters 5 & 6 red.
in 2007, it colors the whole Chart title red.

It seems that regardless of the start and length I pass into the characters
function, the formatting occurs to the entire chart title, not just the
characters I wanted.

Even recording the VBA in 2007 yields no help as it cannot record the
partial font change, even though the GUI allows it. IN 2003 you can record
the partial font change.

Any ideas on what's happening here?


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default 2 fonts in Chart title in E2007

Hi,

It's a known bug and as Gary points out this has been fixed for 2010.
a work around for 2007 would be to use a textbox. So code would be something
like,

ActiveChart.Shapes("Textbox 1").TextFrame.Characters(5,2).Font.Color = vbred

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"J Streger" wrote in message
...
We are tranferring code from 2003 to 2007 and noticed a change in how VBA
reads the following line:

ActiveChart.ChartTitle.Characters(5,2).Font.Color = vbred

IN 2003, it reads it correctly coloring letters 5 & 6 red.
in 2007, it colors the whole Chart title red.

It seems that regardless of the start and length I pass into the
characters
function, the formatting occurs to the entire chart title, not just the
characters I wanted.

Even recording the VBA in 2007 yields no help as it cannot record the
partial font change, even though the GUI allows it. IN 2003 you can record
the partial font change.

Any ideas on what's happening here?


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 2 fonts in Chart title in E2007

Ah, looks like one of those newly introduced into 2007 SP2 bugs. In my SP2
it works as everyone else says, but tested again in my SP1 and it works
fine!

Regards,
Peter T

"Peter T" <peter_t@discussions wrote in message
...
It works for me in 2007, post your actual code.

Regards,
Peter T

"J Streger" wrote in message
...
We are tranferring code from 2003 to 2007 and noticed a change in how VBA
reads the following line:

ActiveChart.ChartTitle.Characters(5,2).Font.Color = vbred

IN 2003, it reads it correctly coloring letters 5 & 6 red.
in 2007, it colors the whole Chart title red.

It seems that regardless of the start and length I pass into the
characters
function, the formatting occurs to the entire chart title, not just the
characters I wanted.

Even recording the VBA in 2007 yields no help as it cannot record the
partial font change, even though the GUI allows it. IN 2003 you can
record
the partial font change.

Any ideas on what's happening here?


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003





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
Extracting chart title from Embedded Excel Chart in PowerPoint Barb Reinhardt Excel Programming 1 June 11th 08 02:22 PM
Changing File Title Fonts bob in calif Excel Discussion (Misc queries) 3 April 17th 08 06:15 PM
2 different fonts in chart title? faberk Excel Programming 2 September 4th 07 12:36 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 09:05 PM.

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

About Us

"It's about Microsoft Excel"