Guzzlr
Well-known Member
- Joined
- Apr 20, 2009
- Messages
- 982
- Office Version
- 2021
- Platform
- Windows
Code:
Sub Clear_Eng_1()
Dim sht As Worksheets
For Each sht In ActiveWorkbook.Worksheets
If (sht.Name <> "ECD") And (sht.Name <> "Revisions") Then
sht.Activate
With Range("A7:AV3000")
.Clear
.NumberFormat = "General"
.Interior.Pattern = xlNone
Range("A8").Interior.ColorIndex = 6
Range("A7") = "Project Tags"
Range("B8").Interior.ColorIndex = 4
' Range("B7") = "MES_Data"
' .ColumnWidth = 8.14
' Columns("A:B").EntireColumn.AutoFit
End With
End If
Next sht
End Sub
Hello All,
I have a sheet in a Workbook named "REV Eng 1"
I have several other tabs.
I wish to clear only REV Eng 1 sheet, however, when I run the above code, I get a mismatch error on line: For Each sht In ActiveWorkbook.Worksheets.
What is my syntax error?
Thanks for the help
excel 2013