View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default Problem Setting Range

You need both lines here...
Set count_Range = Worksheets("Inventory").Range("L4")
Set count_Range = count_Range.Offset(cell_Count)

Or only one line here...
Set count_Range = Worksheets("Inventory").Range("L4").Offset(cell_Co unt)

And...
cell_Count must return a numeric value.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"baconcow"

wrote in message
I have set ranges many times. Usually I set the range for more than one cell.
In this situation, I just want to use one cell.

If this code works:
Set count_range = Worksheets("Inventory").Range("L4")

How come this code doesn't work?
Set count_range =
Worksheets("Inventory").Range(count_range.Offset(c ell_count))

Everything is defined properly, but I get an "Application-defined or
object-defined error".

Thanks