0
我只是想繪製一個簡單的系列圖,但是當我嘗試標記我的座標軸時,出現了一些奇怪的錯誤。我如何標記我的x,y軸?vba charting in excel 2010
With ActiveSheet.ChartObjects.Add(Left:=10, Width:=875, Top:=75, Height:=425)
.Chart.SetSourceData Source:=ws.Range("A1:B" & rows)
.Chart.ChartType = xlLine
With ActiveChart
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Time"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Price"
End With
End With
的錯誤是:對象變量或與塊變量未設置
@PortlandRunner感謝,但沒有骰子。錯誤出現了.Axes(xlCategory,xlPrimary).HasTitle = True .........聲明 – user1681664