Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to format about 30 series on a number of charts. Sometimes I have
100 charts to loop through, which means 3000 series. I'm wondering if there's a way to specify a group of series to format at once rather than looping through each one individually. For example, is there some way to say: objChart.Series(3, 30).ColorIndex = 3 so that formatting is applied to series 3 through 30 at once? Here's what I'm doing now, which seems rather slow: Do While k < (objChart.SeriesCollection.Count) k = k + 1 If k 2 Then objChart.SeriesCollection(k).Border.ColorIndex = st objChart.SeriesCollection(k).Border.Weight = xlThin objChart.SeriesCollection(k).Border.LineStyle = xlNone objChart.SeriesCollection(k).MarkerBackgroundColor Index = xlNone objChart.SeriesCollection(k).MarkerForegroundColor Index = st objChart.SeriesCollection(k).MarkerStyle = xlDot objChart.SeriesCollection(k).Smooth = False objChart.SeriesCollection(k).MarkerSize = 2 objChart.SeriesCollection(k).Shadow = False Else If k = 2 Then objChart.SeriesCollection(k).Delete Else objChart.SeriesCollection(k).Border.ColorIndex = sm objChart.SeriesCollection(k).Border.Weight = xlThin objChart.SeriesCollection(k).Border.LineStyle = xlContinuous objChart.SeriesCollection(k).MarkerBackgroundColor Index = sm objChart.SeriesCollection(k).MarkerForegroundColor Index = sm objChart.SeriesCollection(k).MarkerStyle = xlDiamond objChart.SeriesCollection(k).Smooth = False objChart.SeriesCollection(k).MarkerSize = 3 objChart.SeriesCollection(k).Shadow = False objChart.SeriesCollection(k).ErrorBar Direction:=xlY, Include:=xlBoth, _ Type:=xlCustom, Amount:=xlapp.Workbooks _ (strXlsFile).Worksheets(sn).Range("C47:C" & lr), _ MinusValues:=xlapp.Workbooks(strXlsFile).Worksheet s _ (sn).Range("C47:C" & lr) objChart.SeriesCollection(k).ErrorBars.Border.Colo rIndex = eb objChart.SeriesCollection(k).ErrorBars.Border.Weig ht = xlThin objChart.SeriesCollection(k).ErrorBars.Border.Line Style = xlContinuous End If End If objChart.Axes(xlCategory).TickLabels.NumberFormat = "mm/dd/yyyy hh:mm;@" objChart.Axes(xlCategory, xlPrimary).CategoryType = xlCategoryScale Loop Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Format data series (Chart) | New Users to Excel | |||
How many data series can i format | Charts and Charting in Excel | |||
Default Series format | Charts and Charting in Excel | |||
1 Chart - Different series format | Charts and Charting in Excel | |||
format data series | Charts and Charting in Excel |