Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default remove the border for all series for all charts

Attempting to remove the border for all series for all charts in my
spreadsheet. can this be modified? if so, pelase suggest how?

thanks


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'

'
ActiveSheet.ChartObjects("Chart 10").Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default remove the border for all series for all charts

For Each AllCharts In Worksheets("Chart 10").Shapes

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'

'
For Each AllCharts In Worksheets("Chart 10").Shapes
ActiveSheet.ChartObjects(AllCharts.name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
next AllCharts
End Sub


" wrote:

Attempting to remove the border for all series for all charts in my
spreadsheet. can this be modified? if so, pelase suggest how?

thanks


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'

'
ActiveSheet.ChartObjects("Chart 10").Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default remove the border for all series for all charts

On Apr 9, 3:10 pm, Joel wrote:
For Each AllCharts In Worksheets("Chart 10").Shapes

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'

'
For Each AllCharts In Worksheets("Chart 10").Shapes
ActiveSheet.ChartObjects(AllCharts.name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
next AllCharts
End Sub



" wrote:
Attempting to remove the border for all series for all charts in my
spreadsheet. can this be modified? if so, pelase suggest how?


thanks


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'


'
ActiveSheet.ChartObjects("Chart 10").Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
End Sub- Hide quoted text -


- Show quoted text -


When I run it the editor highlights all charts and says expected sub,
function, or property? need some help please. This is for all charts
in my workbook and for all series. thanks.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default remove the border for all series for all charts

I didn't notice your chart was on a worksheet and not in a worksheet

Sub xyz()
For Each Allcharts In Charts

Charts(Allcharts.Name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic


Next Allcharts
End Sub

" wrote:

On Apr 9, 3:10 pm, Joel wrote:
For Each AllCharts In Worksheets("Chart 10").Shapes

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'

'
For Each AllCharts In Worksheets("Chart 10").Shapes
ActiveSheet.ChartObjects(AllCharts.name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
next AllCharts
End Sub



" wrote:
Attempting to remove the border for all series for all charts in my
spreadsheet. can this be modified? if so, pelase suggest how?


thanks


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'


'
ActiveSheet.ChartObjects("Chart 10").Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
End Sub- Hide quoted text -


- Show quoted text -


When I run it the editor highlights all charts and says expected sub,
function, or property? need some help please. This is for all charts
in my workbook and for all series. thanks.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default remove the border for all series for all charts

On Apr 9, 4:08 pm, Joel wrote:
I didn't notice your chart was on a worksheet and not in a worksheet

Sub xyz()
For Each Allcharts In Charts

Charts(Allcharts.Name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic

Next Allcharts
End Sub



" wrote:
On Apr 9, 3:10 pm, Joel wrote:
For Each AllCharts In Worksheets("Chart 10").Shapes


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'


'
For Each AllCharts In Worksheets("Chart 10").Shapes
ActiveSheet.ChartObjects(AllCharts.name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
next AllCharts
End Sub


" wrote:
Attempting to remove the border for all series for all charts in my
spreadsheet. can this be modified? if so, pelase suggest how?


thanks


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'


'
ActiveSheet.ChartObjects("Chart 10").Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
End Sub- Hide quoted text -


- Show quoted text -


When I run it the editor highlights all charts and says expected sub,
function, or property? need some help please. This is for all charts
in my workbook and for all series. thanks.- Hide quoted text -


- Show quoted text -


Thanks, Is there a way to use all the selected series and not be
limited to just the series 8. the code works well otherwise.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default remove the border for all series for all charts

Try something like this. It will work for 8 series. Don't know if all
charts have 8 series. Let me know if this doesn't work. I think there is a
way to test how many series are in each chart, but I will have to try this
tomorrow.

I'm not going to do anything unless I get a return posting.

Sub xyz()
For Each Allcharts In Charts

Charts(Allcharts.Name).Activate
for series = 1 to 8
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
next series

Next Allcharts
End Sub


" wrote:

On Apr 9, 4:08 pm, Joel wrote:
I didn't notice your chart was on a worksheet and not in a worksheet

Sub xyz()
For Each Allcharts In Charts

Charts(Allcharts.Name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic

Next Allcharts
End Sub



" wrote:
On Apr 9, 3:10 pm, Joel wrote:
For Each AllCharts In Worksheets("Chart 10").Shapes


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'


'
For Each AllCharts In Worksheets("Chart 10").Shapes
ActiveSheet.ChartObjects(AllCharts.name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
next AllCharts
End Sub


" wrote:
Attempting to remove the border for all series for all charts in my
spreadsheet. can this be modified? if so, pelase suggest how?


thanks


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'


'
ActiveSheet.ChartObjects("Chart 10").Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
End Sub- Hide quoted text -


- Show quoted text -


When I run it the editor highlights all charts and says expected sub,
function, or property? need some help please. This is for all charts
in my workbook and for all series. thanks.- Hide quoted text -


- Show quoted text -


Thanks, Is there a way to use all the selected series and not be
limited to just the series 8. the code works well otherwise.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default remove the border for all series for all charts

On Apr 9, 6:18 pm, Joel wrote:
Try something like this. It will work for 8 series. Don't know if all
charts have 8 series. Let me know if this doesn't work. I think there is a
way to test how many series are in each chart, but I will have to try this
tomorrow.

I'm not going to do anything unless I get a return posting.

Sub xyz()
For Each Allcharts In Charts

Charts(Allcharts.Name).Activate
for series = 1 to 8
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
next series

Next Allcharts
End Sub



" wrote:
On Apr 9, 4:08 pm, Joel wrote:
I didn't notice your chart was on a worksheet and not in a worksheet


Sub xyz()
For Each Allcharts In Charts


Charts(Allcharts.Name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic


Next Allcharts
End Sub


" wrote:
On Apr 9, 3:10 pm, Joel wrote:
For Each AllCharts In Worksheets("Chart 10").Shapes


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'


'
For Each AllCharts In Worksheets("Chart 10").Shapes
ActiveSheet.ChartObjects(AllCharts.name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
next AllCharts
End Sub


" wrote:
Attempting to remove the border for all series for all charts in my
spreadsheet. can this be modified? if so, pelase suggest how?


thanks


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'


'
ActiveSheet.ChartObjects("Chart 10").Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
End Sub- Hide quoted text -


- Show quoted text -


When I run it the editor highlights all charts and says expected sub,
function, or property? need some help please. This is for all charts
in my workbook and for all series. thanks.- Hide quoted text -


- Show quoted text -


Thanks, Is there a way to use all the selected series and not be
limited to just the series 8. the code works well otherwise.- Hide quoted text -


- Show quoted text -


Im afraid it does not change all the series. Please help.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default remove the border for all series for all charts

Guarenteed to work

Sub xyz()
For Each Allcharts In Charts

Charts(Allcharts.Name).Activate

For Series = 1 To ActiveChart.SeriesCollection.Count
ActiveChart.SeriesCollection(Series).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
Next Series

Next Allcharts
End Sub

" wrote:

On Apr 9, 6:18 pm, Joel wrote:
Try something like this. It will work for 8 series. Don't know if all
charts have 8 series. Let me know if this doesn't work. I think there is a
way to test how many series are in each chart, but I will have to try this
tomorrow.

I'm not going to do anything unless I get a return posting.

Sub xyz()
For Each Allcharts In Charts

Charts(Allcharts.Name).Activate
for series = 1 to 8
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
next series

Next Allcharts
End Sub



" wrote:
On Apr 9, 4:08 pm, Joel wrote:
I didn't notice your chart was on a worksheet and not in a worksheet


Sub xyz()
For Each Allcharts In Charts


Charts(Allcharts.Name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic


Next Allcharts
End Sub


" wrote:
On Apr 9, 3:10 pm, Joel wrote:
For Each AllCharts In Worksheets("Chart 10").Shapes


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'


'
For Each AllCharts In Worksheets("Chart 10").Shapes
ActiveSheet.ChartObjects(AllCharts.name).Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
next AllCharts
End Sub


" wrote:
Attempting to remove the border for all series for all charts in my
spreadsheet. can this be modified? if so, pelase suggest how?


thanks


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'


'
ActiveSheet.ChartObjects("Chart 10").Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
End Sub- Hide quoted text -


- Show quoted text -


When I run it the editor highlights all charts and says expected sub,
function, or property? need some help please. This is for all charts
in my workbook and for all series. thanks.- Hide quoted text -


- Show quoted text -


Thanks, Is there a way to use all the selected series and not be
limited to just the series 8. the code works well otherwise.- Hide quoted text -


- Show quoted text -


Im afraid it does not change all the series. Please help.


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default remove the border for all series for all charts

Much faster and more direct, and will not flash with each selection of
another chart.

Sub NoSeriesBorders()
Dim chtob As ChartObject
Dim srs As Series
For Each chtob In ActiveSheet.ChartObjects
For Each srs In chtob.Chart.SeriesCollection
On Error Resume Next
srs.Border.LineStyle = xlNone
On Error Goto 0
Next
Next
End Sub

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


wrote in message
ups.com...
Attempting to remove the border for all series for all charts in my
spreadsheet. can this be modified? if so, pelase suggest how?

thanks


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/9/2007 by b0467256
'

'
ActiveSheet.ChartObjects("Chart 10").Activate
ActiveChart.SeriesCollection(8).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
Selection.Interior.ColorIndex = xlAutomatic
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 do i remove the border around a text box Mike M. Excel Discussion (Misc queries) 1 September 3rd 08 05:06 PM
Color vs Colorindex for series border HC Hamaker Charts and Charting in Excel 1 May 16th 07 02:37 AM
Charts switch from 'Series in Rows' to 'Series in Columns' Peace Charts and Charting in Excel 4 March 22nd 07 03:52 AM
Dynamically changing Border-Color of all series() to "0" moondark Charts and Charting in Excel 2 September 20th 05 02:40 PM
Remove border line of a few cells Raymond[_8_] Excel Programming 1 June 29th 04 06:13 PM


All times are GMT +1. The time now is 01:43 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"