Thread: Excel template
View Single Post
 
Old 01-15-2025, 04:49 AM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 588
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Code:
Option Explicit

Sub MakeCopy()
Dim i As Integer
Application.CopyObjectsWithCells = False
    
For i = 1 To 2
    Sheets("Sample Sheet").Copy After:=Sheets(Sheets.Count)
    ActiveSheet.Name = "Sample Sheet" & Sheets.Count + 1
Next i
Application.CopyObjectsWithCells = True 'reset
End Sub
Reply With Quote