>in this code, i get the above error on the ActiveChart.SetSourceData.
>
>If i enter a range manually, it works fine. if i try to calculate it, (cells(1,10).value returns last row), forget it. any ideas?
>
>
>Sub Update()
>'
>' Update Macro
>' Macro recorded 07/22/98 by Raphael D. Jacobs
>' Updated- NG 1/20/99, changed start of graph to 9/1/98
>' NG- changed to 01/01/99
>
>'
> Sheets("Totals").Select
> Range("A1").Select
> ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:= _
> False
> Range("A1").Select
> Selection.AutoFilter Field:=1, Criteria1:=">=01/01/1999"
> ', Operator:=xlAnd
> Sheets("Chart1").Select
> ActiveChart.SetSourceData Source:=Sheets("Totals").Range("A275:H" + CStr(Worksheets("Totals").Cells(1, 10).Value)), _
> PlotBy:=xlColumns
>' + CStr(Worksheets("Totals").Cells(1, 10).Value))
>End Sub
What is returned when you run "+ CStr(Worksheets("Totals").Cells(1, 10).Value))". If this produces a valid cell for you, then try moving the PlotBy:=xlColumns to continue right after the comma
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only