I want to scan all sheets in a workbook and to delete a first row where a value in cell(1,1) is "table".
Code
Sub DeleteFirstRowInWorksheet()
Dim SheetName As Worksheet
Dim i As Integer
For Each SheetName In Sheets
If Range("A1") = "table" Then
Rows("1:1").Select
Selection.Delete Shift:=xlUp
End If
Next SheetName
End Sub
Display More
It delete only in an active sheet. What's wrong?