Selecting rows.
Hi;
Am Mon, 24 Nov 2014 20:12:48 -0800 (PST) schrieb Mandeep Baluja:
Sub SelRows()
Dim R
For R = 1 To 100 step 3
Range(Cells(1, "A"), Cells(R, "A")).EntireRow.Select
Next R
End Sub
try:
Sub Test()
Dim i As Long
Dim rngBig As Range
For i = 1 To 100 Step 3
If rngBig Is Nothing Then
Set rngBig = Rows(i)
Else
Set rngBig = Union(rngBig, Rows(i))
End If
Next
rngBig.Select
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
|