Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
Hello I have a Macro that copyies and inserts a new tab (worksheet) and names it. This basically copies the worksheet. What I need is to simply delete the contents.
The current Macro is: I just need to clear the contents of that worksheet as soon as it's done.
Thank you,
The current Macro is: I just need to clear the contents of that worksheet as soon as it's done.
VBA Code:
Sub AIR_PHT()
Application.ScreenUpdating = False
Application.CopyObjectsWithCells = False
Set ws = Sheets("PHT")
ws.Copy After:=Sheets("PHT")
Sheets(Sheets("PHT").Index + 1).Name = "PHT AIR"
Application.CopyObjectsWithCells = True
Application.ScreenUpdating = True
End Sub
Thank you,