Code:
Sub STEP1()
Dim Wb1 As Workbook
Application.ScreenUpdating = False
Set Wb1 = Workbooks.Open("C:\Users\WolfieeeStyle\Desktop\Files\AlertCodes.xlsx")
Set Ws1 = Wb1.Worksheets.Item(2)
With Ws1
Ws1.Sheets.Cells.Clear
Wb1.Close True
End With
End Sub
i am getting error while clearing all the data in Ws1 i get stuck from this line Ws1.Sheets.Cells.Clear
plz correct the code and help me in solving this problem sir