Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application defined or object defined error
Message
From
23/06/1999 17:13:19
 
General information
Forum:
Microsoft Office
Category:
Excel
Miscellaneous
Thread ID:
00227203
Message ID:
00233217
Views:
26
>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
Map
View

Click here to load this message in the networking platform