Sheet Copy

FMHasan

New Member
Joined
Nov 2, 2021
Messages
36
Office Version
  1. 2016
Platform
  1. Windows
How to make a sheet copying several time in same workbook? like same worksheet need 40 pcs copy
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try this:

This script assumes we are making 20 copies of a sheet named "Master"
Modify to your needs.
VBA Code:
Sub Copy_Sheet_Master()
'Modified 11/24/2021  10:50:12 PM  EST
Application.ScreenUpdating = False
Dim i As Long

    For i = 1 To 20
        Sheets("Master").Copy After:=Sheets(Sheets.Count): ActiveSheet.Name = "Master" & i
        Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Try this:

This script assumes we are making 20 copies of a sheet named "Master"
Modify to your needs.
VBA Code:
Sub Copy_Sheet_Master()
'Modified 11/24/2021  10:50:12 PM  EST
Application.ScreenUpdating = False
Dim i As Long

    For i = 1 To 20
        Sheets("Master").Copy After:=Sheets(Sheets.Count): ActiveSheet.Name = "Master" & i
        Next
Application.ScreenUpdating = True
End Sub
Thank you so much. In where i have to put this code? If i put it in Immediate window , will it work? Actually i am not usual with VBA code.
 
Upvote 0
Normally users put this script in a Button on some other control.
Not in the immediate window. Create a Activex Command Button and put this script in the button.

VBA Code:
'Modified 11/24/2021  10:50:12 PM  EST
Application.ScreenUpdating = False
Dim i As Long

    For i = 1 To 20
        Sheets("Master").Copy After:=Sheets(Sheets.Count): ActiveSheet.Name = "Master" & i
        Next
Application.ScreenUpdating = True
 
Upvote 0
I see you have asked other questions on this forum so how have you run those scripts?
 
Upvote 0

Forum statistics

Threads
1,214,821
Messages
6,121,755
Members
449,049
Latest member
excelknuckles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top