嘿,我正在尝试通过宏从每月提取的数据更新此图表,但在工作一次后仍然遇到问题。语法错误?
Nothing
我可以将Dim result As Range
Set result = blstate.Find(state)
If Not result Is Nothing Then
result.Select 'questionable anyway, but that's another issue
Else
MsgBox "Value '" & state & "' was not found in " & blstate.Address(External:=True) & "."
Exit Sub
End If
语句添加到With Sheets("data").ChartObjects("Chart 3")
.SeriesCollection(1).XValues = ActiveSheet.Range(Range("b55"), Range("b55").End(xlDown))
.SeriesCollection(1).Values = Range(Range("u55"), Range("u55").End(xlDown))
.SeriesCollection(1).Name = "Hi" 'Range("u54")
End With
块以清除它吗?
答案 0 :(得分:0)
With Sheets("data").ChartObjects("Chart 3")
应该是
With Sheets("data").ChartObjects("Chart 3").Chart
图表对象只是实际图表本身的容器