看板 Visual_Basic 關於我們 聯絡資訊
各位版友大家好 我有一Excel 2003可以跑的VBA 可是到了Excel2007就不能跑了 我有查過相關的問題應該是在於.SeriesCollection.Add 於excel 2007底下會出錯 請問各位我應該要如何修改才能夠讓此VBA也可以在2007底下運行呢?? 程式碼如下: count = count + 1 Set x = unitCell.Offset(2, i * 2) Set x = x.Resize(x.End(xlDown).Row - x.Row + 1, 1) Set y = unitCell.Offset(2, i * 2 + 1) Set y = y.Resize(x.End(xlDown).Row - x.Row + 1, 1) With Sheets(1).ChartObjects(1).Chart .SeriesCollection.Add Source:=y (錯誤在這) With .SeriesCollection(.SeriesCollection.count) .XValues = x .Name = paramNames(i + 1) If count = 2 Then .AxisGroup = xlSecondary End With If count = 1 Then With .Axes(xlCategory) .HasTitle = True -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 89.248.153.121