Variable

  • Thread starter Thread starter Candy
  • Start date Start date
C

Candy

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.
 
Back
Top