Office中国论坛/Access中国论坛

标题: 一个关于PlotArea.Interior.ColorIndex的问题 [打印本页]

作者: xxxrrr    时间: 2005-4-13 00:48
标题: 一个关于PlotArea.Interior.ColorIndex的问题
我一下的程序在编译时黄色标记的部分出错,那位朋友能帮帮忙,谢谢。

Dim wb As Object

Set wb = CreateObject("Excel.Application")

wb.charts.Add
wb.charts(1).Activate
wb.charts(1).chartwizard excel.Application.Worksheets("Tabelle1").Range(Cell1, Cell2), 4, 10, 2, 1, 1, 1, "Zeitlicher Verlauf :  " & Prüfobjekt & "  " & Versuchsbezeichnung & "  Beginn: " & Startdatum & ", " & Startuhrzeit, "Zeit ab Versuchsstart", "Tü[K]", ""
wb.ActiveChart.PlotArea.Interior.ColorIndex = (0)

wb.ActiveChart.Axes(1).HasMajorGridlines = True
        wb.ActiveChart.Axes(2).HasMajorGridlines = True
        wb.ActiveChart.Axes(2).MinimumScale = Kleinstwert_ZeitTemp '0
        wb.ActiveChart.Axes(2).MaximumScale = Hoechstwert_ZeitTemp '80
        wb.ActiveChart.Axes(2).MajorUnit = Hauptintervall_ZeitTemp '5
        wb.ActiveChart.PageSetup.CenterHeader = ""
        wb.ActiveChart.PageSetup.CenterFooter = ""
        wb.ActiveChart.PageSetup.RightFooter = "AGR/E3-Hochstromlabor " & Date
        wb.ActiveChart.SeriesCollection(1).Border.ColorIndex = 3
        wb.ActiveChart.SeriesCollection(2).Border.ColorIndex = 4
        wb.ActiveChart.SeriesCollection(3).Border.ColorIndex = 5
        wb.ActiveChart.SeriesCollection(4).Border.ColorIndex = 7
        wb.ActiveChart.SeriesCollection(5).Border.ColorIndex = 8
        wb.ActiveChart.SeriesCollection(6).Border.ColorIndex = 10
        wb.ActiveChart.SeriesCollection(7).Border.ColorIndex = 13
        wb.ActiveChart.SeriesCollection(8).Border.ColorIndex = 1
        wb.ActiveChart.SeriesCollection(9).Border.ColorIndex = 9
        wb.ActiveChart.SeriesCollection(10).Border.ColorIndex = 6
        
        
        wb.charts(1).chartarea.Copy
        
        




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3