danomaniac
Programmer
I'm having trouble referencing range names in my code..
I have several ranges named "range01", "range02", "range03" etc.
I want to clear the contents of all the ranges and this is what I have, and it gives me an error 1004 'Method range of object _worksheet failed"
dim rname as string
For i = 1 to 3
rname = "range0" & i
Range(rname).clearcontents
next
Thanks.
"It's more like it is now, than it ever has been."
I have several ranges named "range01", "range02", "range03" etc.
I want to clear the contents of all the ranges and this is what I have, and it gives me an error 1004 'Method range of object _worksheet failed"
dim rname as string
For i = 1 to 3
rname = "range0" & i
Range(rname).clearcontents
next
Thanks.
"It's more like it is now, than it ever has been."