Shazam
11-30-2006, 11:15 AM
Hi everyone,
I would like this code below to loop through every worksheet in the workbook and delete the last active row in column C, But ignore the active worksheet and "Individual Report" and Comparison Chart" worksheets.
I tried the code below but no luck. Can we modify it to make it work?
Sub Test()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> ActiveSheet.Name And ws.Name <> "Individual Report" And ws.Name <> "Comparison Chart" Then
Rows(Range("C65536").End(xlUp).Row).Delete ' Delete last active row
With ws
End With
End If
Next
Next ws
End Sub
I would like this code below to loop through every worksheet in the workbook and delete the last active row in column C, But ignore the active worksheet and "Individual Report" and Comparison Chart" worksheets.
I tried the code below but no luck. Can we modify it to make it work?
Sub Test()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> ActiveSheet.Name And ws.Name <> "Individual Report" And ws.Name <> "Comparison Chart" Then
Rows(Range("C65536").End(xlUp).Row).Delete ' Delete last active row
With ws
End With
End If
Next
Next ws
End Sub