Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
is there quick vba code to select specific no. of entire row down? sub select_row_down(byval intRow as long) ???selection.entirerow.select??? ??????? end sub thanks Leung |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Leung,
Perhaps something like: '===================== Public Sub Tester1() Dim Rng As Range Const NumOfRows = 10 '<<====== CHANGE Set Rng = ActiveCell.EntireRow.Resize(NumOfRows) End Sub '<<===================== BTW, it is rarely necessary, or desirable, to make selections. In the above example, manipulation can be effected on the Rng object variable without any selection. E.g.: Rng.Interior.ColorIndex = 36 --- Regards, Norman "Leung" wrote in message ... Hi is there quick vba code to select specific no. of entire row down? sub select_row_down(byval intRow as long) ???selection.entirerow.select??? ??????? end sub thanks Leung |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Leung,
Const NumOfRows = 10 '<<====== CHANGE should read: Const NumOfRows As Long = 10 '<<====== CHANGE --- Regards, Norman "Norman Jones" wrote in message ... Hi Leung, Perhaps something like: '===================== Public Sub Tester1() Dim Rng As Range Const NumOfRows = 10 '<<====== CHANGE Set Rng = ActiveCell.EntireRow.Resize(NumOfRows) End Sub '<<===================== BTW, it is rarely necessary, or desirable, to make selections. In the above example, manipulation can be effected on the Rng object variable without any selection. E.g.: Rng.Interior.ColorIndex = 36 --- Regards, Norman "Leung" wrote in message ... Hi is there quick vba code to select specific no. of entire row down? sub select_row_down(byval intRow as long) ???selection.entirerow.select??? ??????? end sub thanks Leung |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
can we not use
range("a1").offset(5,0) it will godown 5 rows.from A1 have I understood your question. "Leung" wrote in message ... Hi is there quick vba code to select specific no. of entire row down? sub select_row_down(byval intRow as long) ???selection.entirerow.select??? ??????? end sub thanks Leung |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select between rows | Excel Discussion (Misc queries) | |||
Cannot select rows in VBA | Excel Discussion (Misc queries) | |||
How can i randomly select 780 rows from 4000 rows of data | Excel Worksheet Functions | |||
select block of rows w/data between blank rows | Excel Programming | |||
Unable to select rows in the repeat rows on top option | Excel Discussion (Misc queries) |