EntireRow VS Row
Jan 7, 2008
I can't seem to find much online documentation for the 'Entirerow' property...
"Returns a Range object that represents the entire row (or rows) that contains the specified range. Read-only.
Example: This example sets the value of the first cell in the row that contains the active cell. The example must be run from a worksheet."
ActiveCell.EntireRow.Cells(1, 1).Value = 5
explain the difference (if there is any) between:
Rows(tmp).Delete
and
Rows(tmp).EntireRow.Delete
View 6 Replies
Oct 3, 2008
Within my loop I would like to delete an entire row - but as my loop goes down each row one by one as soon as one row is deleted the next row moves up and is then not included in the loop.
Dim Rng As Range, Last As Integer, Dn As Range
Sheets("ttool").Select
Last = Sheets("old ttool").Range("J" & Rows.Count).End(xlUp).Row
Set Rng = Range(Range("J2"), Range("J" & Rows.Count).End(xlUp))
For Each Dn In Rng
If Dn "" Then
Last = Last + 1
Sheets("old ttool").Rows(Last).Value = Dn.EntireRow.Value
Dn.EntireRow.Delete
End If
Next Dn
If I run it 4 times it completes as it should. Or if I change it to entirerow.clearcontents all rows are cleared.
View 9 Replies
View Related
Nov 10, 2008
why the code below errors out? Thanks...
Range(Cells(7, 1), Cells(WDIfinalrow, 1)).EntireRow.Delete
View 9 Replies
View Related
Dec 28, 2008
I have a userform.listbox1 that is generated by entries made from another userform on a commandbutton1_click I want loop through the listbox, find the value on one sheet and copy/paste to another.
the code below is what i have come up with. I do not get any errors, it just doesn't copy/paste anything. Why sheet1 has over 5400 rows, sheet2 is blank
View 4 Replies
View Related