Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error number 1004
Hi to everybody,
I use the line below to select data for creating a chart: ActiveChart.SetSourceData Source:=Sheets("résultats").Range (Cells(1, 1), Cells(k + 1, i + 1)), _ PlotBy:=xlRows I have the error number 1004 when I execute this line. I know that I can not use Cells inside a Range procedure but how can I select a range of cells in some other way? Thanks for the help! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error number 1004
Alain,
You can use Cells inside a Range property, but your problem is probably caused by not qualifying the statement. Try With Sheets("résultats") ActiveChart.SetSourceData Source:=.Range(.Cells(1, 1), .Cells(k + 1, i + 1)), _ PlotBy:=xlRows End With -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Alain Turgeon" wrote in message ... Hi to everybody, I use the line below to select data for creating a chart: ActiveChart.SetSourceData Source:=Sheets("résultats").Range (Cells(1, 1), Cells(k + 1, i + 1)), _ PlotBy:=xlRows I have the error number 1004 when I execute this line. I know that I can not use Cells inside a Range procedure but how can I select a range of cells in some other way? Thanks for the help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
error 1004 (VBA) | Excel Discussion (Misc queries) | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
Runtime error '1004' General ODBC error | New Users to Excel | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
VBA error - run-time error '1004': | Excel Programming |