Brian.Crawford
Board Regular
- Joined
- Oct 3, 2007
- Messages
- 136
I was trying to clear a range using
Sheets("theSheet").range(cells(5,tcol),cells(trow,tcol))=""
(where trow & tcol are previously defined)
this gives me an error, but the following works
Sheets("theSheet").range(range(cells(5,tcol),cells(trow,tcol)).address)=""
if I debug/print range(cells(5,tcol),cells(trow,tcol)).address
it gives me the right range for range(cells(5,tcol),cells(trow,tcol))
so why doesn't the first one work.
thanks
Brian
Sheets("theSheet").range(cells(5,tcol),cells(trow,tcol))=""
(where trow & tcol are previously defined)
this gives me an error, but the following works
Sheets("theSheet").range(range(cells(5,tcol),cells(trow,tcol)).address)=""
if I debug/print range(cells(5,tcol),cells(trow,tcol)).address
it gives me the right range for range(cells(5,tcol),cells(trow,tcol))
so why doesn't the first one work.
thanks
Brian