画图的宏

返回

Sub Macro1() ' ' Macro1 Macro ' Columns("C:D").Select Charts.Add ActiveChart.ChartType = xlXYScatterLines ActiveChart.SetSourceData Source:=Sheets("pro11_001").Range("C1:D38"), _ PlotBy:=xlColumns ActiveChart.Location Where:=xlLocationAsNewSheet With ActiveChart .HasTitle = False .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = False End With ActiveChart.PlotArea.Select ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(2).XValues = "=pro11_001!R2C5:R38C5" ActiveChart.SeriesCollection(2).Values = "=pro11_001!R2C6:R38C6" ActiveChart.SeriesCollection(2).Name = "=pro11_001!R1C6" ActiveChart.PlotArea.Select ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(3).XValues = "=pro11_001!R2C7:R38C7" ActiveChart.SeriesCollection(3).Values = "=pro11_001!R2C8:R38C8" ActiveChart.SeriesCollection(3).Name = "=pro11_001!R1C8" ActiveChart.PlotArea.Select ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(4).XValues = "=pro11_001!R2C9:R38C9" ActiveChart.SeriesCollection(4).Values = "=pro11_001!R2C10:R38C10" ActiveChart.SeriesCollection(4).Name = "=pro11_001!R1C10" ActiveChart.PlotArea.Select ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(5).XValues = "=pro11_001!R2C11:R38C11" ActiveChart.SeriesCollection(5).Values = "=pro11_001!R2C12:R38C12" ActiveChart.SeriesCollection(5).Name = "=pro11_001!R1C12" ActiveChart.PlotArea.Select ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(6).XValues = "=pro11_001!R2C13:R38C13" ActiveChart.SeriesCollection(6).Values = "=pro11_001!R2C14:R38C14" ActiveChart.SeriesCollection(6).Name = "=pro11_001!R1C14" ActiveChart.PlotArea.Select ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(7).XValues = "=pro11_001!R2C15:R38C15" ActiveChart.SeriesCollection(7).Values = "=pro11_001!R2C16:R38C16" ActiveChart.SeriesCollection(7).Name = "=pro11_001!R1C16" ActiveChart.PlotArea.Select ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(8).XValues = "=pro11_001_a!R2C1:R8C1" ActiveChart.SeriesCollection(8).Values = "=pro11_001_a!R2C2:R8C2" ActiveChart.SeriesCollection(8).Name = "=pro11_001_a!R1C2" End Sub
返回