PC Review


Reply
Thread Tools Rate Thread

change in the formatting of data series

 
 
Kathl
Guest
Posts: n/a
 
      29th Apr 2008
The code implemented looks like this:

If ActiveChart.SeriesCollection(num).Name = "BASEL" Then

ActiveChart.SeriesCollection(num).DataLabels.Select

With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With

ActiveChart.SeriesCollection(num).Select

With Selection.Border
.ColorIndex = 57
.Weight = xlHairline
.LineStyle = xlContinuous
End With

Selection.InvertIfNegative = False
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With

End If

The problem is that the progrma does not change the formatting of the label,
but the formatting of the data series bar itself (i.e. changing the colour)
is working perfectly.

Tried different things but didn't come to a solution...
 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      29th Apr 2008
Remove this line and try again:

ActiveChart.SeriesCollection(num).Select

Note: I didn't try it, but this line changes the focus of the macro code to
the series, not the labels.

In general you should try to adjust your code so instead of selecting
objects, then formatting the selection, you directly format the objects
without selecting them. This is covered in my web site:

http://peltiertech.com/Excel/ChartsH...kChartVBA.html

and in my blog:

http://peltiertech.com/WordPress/200...ecorded-macro/

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Kathl" <(E-Mail Removed)> wrote in message
news:3E3E1F4A-A304-41B4-8724-(E-Mail Removed)...
> The code implemented looks like this:
>
> If ActiveChart.SeriesCollection(num).Name = "BASEL" Then
>
> ActiveChart.SeriesCollection(num).DataLabels.Select
>
> With Selection.Font
> .Name = "Arial"
> .FontStyle = "Bold"
> .Size = 10
> .Strikethrough = False
> .Superscript = False
> .Subscript = False
> .OutlineFont = False
> .Shadow = False
> .Underline = xlUnderlineStyleNone
> .ColorIndex = xlAutomatic
> .Background = xlAutomatic
> End With
>
> ActiveChart.SeriesCollection(num).Select
>
> With Selection.Border
> .ColorIndex = 57
> .Weight = xlHairline
> .LineStyle = xlContinuous
> End With
>
> Selection.InvertIfNegative = False
> With Selection.Interior
> .ColorIndex = 36
> .Pattern = xlSolid
> End With
>
> End If
>
> The problem is that the progrma does not change the formatting of the
> label,
> but the formatting of the data series bar itself (i.e. changing the
> colour)
> is working perfectly.
>
> Tried different things but didn't come to a solution...



 
Reply With Quote
 
Kathl
Guest
Posts: n/a
 
      30th Apr 2008
Heah, with deleting all selections everything's working.

Thx a lot


"Jon Peltier" wrote:

> Remove this line and try again:
>
> ActiveChart.SeriesCollection(num).Select
>
> Note: I didn't try it, but this line changes the focus of the macro code to
> the series, not the labels.
>
> In general you should try to adjust your code so instead of selecting
> objects, then formatting the selection, you directly format the objects
> without selecting them. This is covered in my web site:
>
> http://peltiertech.com/Excel/ChartsH...kChartVBA.html
>
> and in my blog:
>
> http://peltiertech.com/WordPress/200...ecorded-macro/
>
> - Jon
> -------
> Jon Peltier, Microsoft Excel MVP
> Tutorials and Custom Solutions
> Peltier Technical Services, Inc. - http://PeltierTech.com
> _______
>
>
> "Kathl" <(E-Mail Removed)> wrote in message
> news:3E3E1F4A-A304-41B4-8724-(E-Mail Removed)...
> > The code implemented looks like this:
> >
> > If ActiveChart.SeriesCollection(num).Name = "BASEL" Then
> >
> > ActiveChart.SeriesCollection(num).DataLabels.Select
> >
> > With Selection.Font
> > .Name = "Arial"
> > .FontStyle = "Bold"
> > .Size = 10
> > .Strikethrough = False
> > .Superscript = False
> > .Subscript = False
> > .OutlineFont = False
> > .Shadow = False
> > .Underline = xlUnderlineStyleNone
> > .ColorIndex = xlAutomatic
> > .Background = xlAutomatic
> > End With
> >
> > ActiveChart.SeriesCollection(num).Select
> >
> > With Selection.Border
> > .ColorIndex = 57
> > .Weight = xlHairline
> > .LineStyle = xlContinuous
> > End With
> >
> > Selection.InvertIfNegative = False
> > With Selection.Interior
> > .ColorIndex = 36
> > .Pattern = xlSolid
> > End With
> >
> > End If
> >
> > The problem is that the progrma does not change the formatting of the
> > label,
> > but the formatting of the data series bar itself (i.e. changing the
> > colour)
> > is working perfectly.
> >
> > Tried different things but didn't come to a solution...

>
>
>

 
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
formatting data series KRK Microsoft Excel Charting 0 24th Mar 2008 12:57 PM
Formatting data series - line between certain data points only =?Utf-8?B?YWxhbl9t?= Microsoft Excel Charting 0 20th Sep 2007 05:16 PM
Formatting a line on one data-series Jeff Franzetti Microsoft Excel Charting 1 29th Apr 2004 05:44 PM
Re: Data Series - Formatting dvt Microsoft Excel Charting 0 7th Aug 2003 08:25 PM
FORMATTING THE DATA SERIES Consuelo Guenther Microsoft Excel Charting 1 11th Jul 2003 01:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:37 PM.