Public Okręt podwodny UpdateChart ()
Ciemnawy ChtObj Jako ChartObject
Ciemnawy PriceType Długo
Ustalony ChtObj = ActiveSheet.ChartObjects (1)
Application.ScreenUpdating = Fałszywy
PriceType = ActiveSheet.Cells (13, 20). Wartość
Jeżeli PriceType = (1) Wtedy
ChtObj.Chart.SeriesCollection (1).Values = ActiveSheet.Range ("771: 1475")
ChtObj.Chart.SeriesCollection (1).MarkerBackgroundColorIndex = (1)
ChtObj.Chart.SeriesCollection (1).MarkerBackgroundColorIndex = 4
ChtObj.Visible = Prawdziwy
Inny
Jeżeli PriceType = 2 Wtedy
ChtObj.Chart.SeriesCollection (1).Values = ActiveSheet.Range ("$D$771: $D$1475")
ChtObj.Chart.SeriesCollection (1).MarkerForegroundColorIndex = (1)
ChtObj.Chart.SeriesCollection (1).MarkerBackgroundColorIndex = 5
ChtObj.Visible = Prawdziwy
Inny
Jeżeli PriceType = 3 Wtedy
ChtObj.Chart.SeriesCollection (1).Values = ActiveSheet.Range ("$E$771: $E$1475")
ChtObj.Chart.SeriesCollection (1).MarkerForegroundColorIndex = (1)
ChtObj.Chart.SeriesCollection (1).MarkerBackgroundColorIndex = 3
ChtObj.Visible = Prawdziwy
Inny
Jeżeli PriceType = 4 Wtedy
ChtObj.Chart.SeriesCollection (1).Values = ActiveSheet.Range ("$I$771: $I$1475")
ChtObj.Chart.SeriesCollection (1).MarkerForegroundColorIndex = (1)
ChtObj.Chart.SeriesCollection (1).MarkerBackgroundColorIndex = 9
ChtObj.Visible = Prawdziwy
Inny
Jeżeli PriceType = 5 Wtedy
ChtObj.Chart.SeriesCollection (1).Values = ActiveSheet.Range ("$F$771: $F$1475")
ChtObj.Chart.SeriesCollection (1).MarkerForegroundColorIndex = (1)
ChtObj.Chart.SeriesCollection (1).MarkerBackgroundColorIndex = 7
ChtObj.Visible = Prawdziwy
Inny
Jeżeli PriceType = 6 Wtedy
ChtObj.Chart.SeriesCollection (1).Values = ActiveSheet.Range ("D$771: $D$1475")
ChtObj.Chart.SeriesCollection (1).MarkerForegroundColorIndex = (1)
ChtObj.Chart.SeriesCollection (1).MarkerBackgroundColorIndex = 5
ChrtObj.Chart.SeriesCollection.Add
ChtObj.Chart.SeriesCollection (2).Values = ActiveSheet.Range ("E$771: $E$1475")
ChtObj.Chart.SeriesCollection (2).MarkerForegroundColorIndex = (1)
ChtObj.Chart.SeriesCollection (2).MarkerBackgroundColorIndex = 3
ChrtObj.Chart.SeriesCollection.Add
ChtObj.Chart.SeriesCollection (3).Values = ActiveSheet.Range ("I$771: $I$1475")
ChtObj.Chart.SeriesCollection (3).MarkerForegroundColorIndex = (1)
ChtObj.Chart.SeriesCollection (3).MarkerBackgroundColorIndex = 9
ChtObj.Visible = Prawdziwy
Kończyć Jeżeli
Kończyć Jeżeli
Kończyć Jeżeli
Kończyć Jeżeli
Kończyć Jeżeli
Kończyć Jeżeli
ActiveSheet.PivotTables ("PivotTable3") .PivotCache.Refresh
Application.ScreenUpdating = Prawdziwy
Końcówka Okręt podwodny
|