Thread: Variable rows
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Variable rows

Whoops! I forgot the EntireRow part...

ActiveCell.Resize(V).EntireRow.Select

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
I would use this instead of the complex statement you are using...

Rws = 58
ActiveCell.Resize(Rws).Select

where I used a variable named Rws to hold the number of rows down from the
active cell to select.

--
Rick (MVP - Excel)


"Jwil" wrote in message
...
Hello,

How do I use a variable to select entire rows? I want to ask the user how
many rows they want to select and then use that number to select the
rows.

For instance:
ActiveCell.Offset(0, 0).Rows("1:58").EntireRow.Select
selects 58 rows. I would like to replace the '58' with a variable so
that I
can choose how many I want to delete.