Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default change in the formatting of data series

The code implemented looks like this:

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

ActiveChart.SeriesCollection(num).DataLabels.Selec t

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...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default change in the formatting of data series

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" wrote in message
...
The code implemented looks like this:

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

ActiveChart.SeriesCollection(num).DataLabels.Selec t

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...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default change in the formatting of data series

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" wrote in message
...
The code implemented looks like this:

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

ActiveChart.SeriesCollection(num).DataLabels.Selec t

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
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
formatting data series KRK Charts and Charting in Excel 0 March 24th 08 12:57 PM
Formatting data series - line between certain data points only alan_m Charts and Charting in Excel 0 September 20th 07 05:16 PM
How do I change the shape of a data series juliejg1 Charts and Charting in Excel 2 July 12th 07 05:32 PM
?-Change data series range as data is entered? isofuncurves Charts and Charting in Excel 4 January 24th 06 06:15 PM
PivotTable Data Series Formatting Jay Charts and Charting in Excel 1 January 9th 06 02:27 AM


All times are GMT +1. The time now is 09:48 PM.

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"