Excel 2000 Chart mit vb 6.0 problem

  • Sonstige

Es gibt 3 Antworten in diesem Thema. Der letzte Beitrag () ist von alchimist.

    Excel 2000 Chart mit vb 6.0 problem

    Hallo, bin neu hier ich hoff ich mach keine fehler bei der angabe meines problems.

    also folgendes ich wollte ein programm machen das aus txt files daten liest diese ins excel importiert und dann daraus eine chart macht. Die chart wird erstellt usw. passt alles, ich erstell die chart mit dem chartwirzard befehl

    With Charts.Add
    .ChartWizard Source:=Worksheets("Chart").Range(""), _
    gallery:=xlXYScatter, HasLegend:=True, Title:="", CategoryTitle:="", ValueTitle:=""
    End With

    Mein Hauptproblem is das ich die Legends oder Series auf da seite umbennen will, jetzt is meine frage, wie dafür da befehl is, und muss ich da einen parameter bei dem chartwizard befehl dazugeben oder kann ich das nachher auch noch verändern weil soweit ich das gsehn hab kann man dann im excel die namen von den series nicht mehr ändern.

    Ein kleines nebenproblem is das ich eigenltich eine andere chart will, ich möcht eigentlich die ham xlXYScatterLinesNoMarkers aber das geht irgendwie ned, vielleicht wissts ihr da ja zufällig was.

    Danke

    mfg
    Ich bin auch nicht so der Experte mit Chart Diagrammen,
    weil die immer so viele 'Objekt- oder Anwendugsdefinierte
    Fehler' zurückgeben, aber es gibt doch eine SeriesCollection
    in der DataLabels sind. Die repräsentieren doch diese Legenden
    Beschriftungen und haben soweit ich weiß auch eine
    Caption Eigenschaft.
    Hallo colty,


    probiere mal dieses aus:


    <font face="courier new" size="2pt">
    <font color="#000000"></font><font color="#0000AA">Dim</font><font color="#000000"> oChart </font><font color="#0000AA">As</font><font color="#000000"> Chart</font>

    <font color="#000000"></font><font color="#0000AA">Set</font><font color="#000000"> oChart = Charts.Add</font>

    <font color="#000000"></font><font color="#0000AA">With</font><font color="#000000"> oChart</font>

    <font color="#000000"> .ChartType = xlXYScatterLinesNoMarkers</font>

    <font color="#000000"> .SetSourceData Worksheets(1).Range("A1:B5"), xlColumns</font>

    <font color="#000000"> .SeriesCollection(1).Name = "=""Testeintrag"""</font>

    <font color="#000000"> .Location xlLocationAsNewSheet, "Diagrammname"</font>

    <font color="#000000"> .HasTitle = </font><font color="#0000AA">True</font><font color="#000000"></font>

    <font color="#000000"> .ChartTitle.Text = "Diagrammtitel"</font>

    <font color="#000000"> .Axes(xlCategory, xlPrimary).HasTitle = </font><font color="#0000AA">True</font><font color="#000000"></font>

    <font color="#000000"> .Axes(xlCategory, xlPrimary).AxisTitle.Text = "X-Werte"</font>

    <font color="#000000"> .Axes(xlValue, xlPrimary).HasTitle = </font><font color="#0000AA">True</font><font color="#000000"></font>

    <font color="#000000"> .Axes(xlValue, xlPrimary).AxisTitle.Text = "Y-Werte"</font>

    <font color="#000000"></font><font color="#0000AA">End</font><font color="#000000"> </font><font color="#0000AA">With</font><font color="#000000"></font>

    </font>


    So sollte es klappen,



    Gruß Markus