ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   selecting multiple rows (https://www.excelbanter.com/excel-programming/278737-selecting-multiple-rows.html)

Ron de Bruin

selecting multiple rows
 
Try this with resize

Rows(ActiveCell.Row).Resize(5).Select


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Stuart" wrote in message ...
how do i select multiple rows from within VBA, I need something simillar to
the following, obviously the following line does not work, however it should
give you the idea of what I am after. i.e. select the row of the activecell
along with the five rows below it!

Rows(ActiveCell.Row, ActiveCell.Offset(5, 0)).Select





Stuart[_8_]

selecting multiple rows
 
how do i select multiple rows from within VBA, I need something simillar to
the following, obviously the following line does not work, however it should
give you the idea of what I am after. i.e. select the row of the activecell
along with the five rows below it!

Rows(ActiveCell.Row, ActiveCell.Offset(5, 0)).Select



Tim[_25_]

selecting multiple rows
 

rownum = activecell.row
Rows(rownum & ":" & rownum+5).select

-----Original Message-----
how do i select multiple rows from within VBA, I need

something simillar to
the following, obviously the following line does not

work, however it should
give you the idea of what I am after. i.e. select the

row of the activecell
along with the five rows below it!

Rows(ActiveCell.Row, ActiveCell.Offset(5, 0)).Select


.



All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com