Quick Copy Sheet

The code can quickly copy the same worksheet in a table, and you can customize the worksheet name.

1, Code

Sub Copy Sheet ()
 ' 
' copy a worksheet macro 
' copy a worksheet, and table names in ascending order 
' 
' shortcut: Ctrl + the p- 
'
     Sheets ( " Information system conditions (system 1) " ) .Select 
    
    Sheets ( " Information System where (system. 1) " ) .Copy the After: = Sheets (Sheets.Count) 
    
    Sheets (Sheets.Count) .Name = " information system conditions (system " & Sheets.Count & " ) " 
    
End Sub

2, commentary

  
# Copy the worksheet entitled "Information system conditions (system)," the worksheet, this table as a template 
 Sheets ( " Information system conditions (system 1) " ) .Select 

# copy the template to the last worksheet in turn sliding scale a worksheet 
 sheets ( " information system conditions (system 1) " ) .Copy the After: = sheets (Sheets.Count) 
    
# name the new copy on a table name: information system conditions (system Number the) 
 sheets (Sheets.Count). name = " information system conditions (system " & Sheets.Count & " ) "

 

Guess you like

Origin www.cnblogs.com/smartmsl/p/10973259.html