0

我试图在创建时将 2 个图表与 .left 并排放置,但我没有工作。我想念什么?

With ThisWorkbook.Worksheets("Diagram").ChartObjects.Add(200, 200, 600, 400).Chart
    .Parent.Name = Name
    .left = 400

    If Not .HasTitle Then
        .HasTitle = True
        .ChartTitle.Text = Name
    End If

    .ChartType = xlXYScatterSmoothNoMarkers
    .Axes(xlValue).CrossesAt = CrossAt
    .Axes(xlCategory).TickLabels.NumberFormat = "YYYY-MM-DD"

    For i = LBound(sXRanges) To UBound(sXRanges)
        With .SeriesCollection.NewSeries
            .Name = country(i)
            .XValues = sXRanges(i)
            .Values = sYRanges(i)
        End With
    Next
End With
4

1 回答 1

0

.Left不是您引用的图表的属性。你真正想要使用的是 ChartObject.Parent.Left

于 2012-09-20T13:13:40.667 回答