Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
I had this code slightly tweaked to make sure my symbols (to launch macros) are not included when I copy a sheet within the workbook. I am doing this as I'm working on filtering.
This modified code works with ease. However, as soon as I put in in a "Run all" macro it does not copy the workbook and rename it. I know it works perfect for it does when it is by itself.
The code is:
I have three of therse , and the clear button works- I just have to confirm I want to delete the worksheet before I can delete the next one.
Thank you,
This modified code works with ease. However, as soon as I put in in a "Run all" macro it does not copy the workbook and rename it. I know it works perfect for it does when it is by itself.
The code is:
VBA Code:
Sub SURFACE_PHT()
Application.ScreenUpdating = False
Application.CopyObjectsWithCells = False
Set ws = Sheets("PHT")
ws.Copy After:=Sheets("PHT AIR")
Sheets(Sheets("PHT AIR").Index + 1).Name = "PHT SURFACE"
Application.CopyObjectsWithCells = True
Application.ScreenUpdating = True
End Sub
I have three of therse , and the clear button works- I just have to confirm I want to delete the worksheet before I can delete the next one.
Thank you,