Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hi,
The reason Jon and I are pointing these issues out is that your single line of code is fine. The reason it fails is something else is wrong and Jon and I can't see your code so we are just suggesting the most likely places. Fact is, code that fails on a particular line can fail despite the fact that the line is correct. -- Thanks, Shane Devenshire "Jon Peltier" wrote: Make sure variables are declared and defined, and make sure you reference potentially indeterminate ranges. Dim RN As Range Dim wks As Worksheet Dim r As Long Set wks = ActiveWorkbook.Worksheets("My Sheet") r = 100 Set RN = wks.Range(wks.Cells(2,1), wks.Cells(r, 1)) - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Daniel" wrote in message ... What wrong with this. It create error. How can I improve to get rid the error? Set RN = Range(Cells(2, 1), Cells(r, 1)) Thanks Daniel |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to compute a range of cells based on another range of cells? | Excel Worksheet Functions | |||
how to compute a range of cells based on another range of cells? | Excel Worksheet Functions | |||
How to use macros to copy a range of cells which can exclude some cells which I didn't want to be copied? | Excel Worksheet Functions | |||
How do you sum a range of more than 30 cells. I get error each time I try. | Excel Worksheet Functions | |||
sum a range of cells that include an error | Excel Discussion (Misc queries) |