lior03
02-08-2006, 12:23 PM
hello
the following macro can be found in john walkenbach's book
"excel 2002 vba programming" - page 305.it do not work.
Sub deleteEmptyrows()
Dim row
Dim LastRow As Long, r As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
LastRow = LastRow + ActiveSheet.UsedRange.row - 1
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.WorksheetFunction.CountA(row(r)) = 0 Then
row(r).Delete
End If
Next
End Sub
please help
thanks
the following macro can be found in john walkenbach's book
"excel 2002 vba programming" - page 305.it do not work.
Sub deleteEmptyrows()
Dim row
Dim LastRow As Long, r As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
LastRow = LastRow + ActiveSheet.UsedRange.row - 1
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.WorksheetFunction.CountA(row(r)) = 0 Then
row(r).Delete
End If
Next
End Sub
please help
thanks