Thread
:
Variable
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Variable
try
ws.Range("A3:A" & rw & "'").Name = "range_name"
rw=4
ws.Range("A3:A" & rw).Name = "range_name"
--
Don Guillett
SalesAid Software
"Candy" wrote in message
...
Hi guys,Thanks for answering my question. Really great
help! Well, I have another problem.
I need to define a range but the row number has to be a
variable. Supposed ws is defined as a worksheet and rw an
integer variable.
Here is the code:
ws.Range("A3:A" & rw & "'").Name = "range_name"
I got run-time error. Method 'Range of object'_worksheet
failed
What did I do wrong?
Thanks, again.
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]