Created
March 11, 2015 05:46
-
-
Save bluejaysql/65bdb425934dfb6c2780 to your computer and use it in GitHub Desktop.
Excel VBA: Simple copy of worksheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
Dim wb As Workbook | |
Set wb = ThisWorkbook | |
Application.DisplayAlerts = False | |
Dim ws As Worksheet | |
For Each ws In wb.Worksheets | |
If (ws.Name Like "Second Sheet*") Then | |
ws.Delete | |
End If | |
Next | |
Application.DisplayAlerts = False | |
Sheets("First Sheet").Copy after:=ThisWorkbook.Sheets("First Sheet") | |
ActiveSheet.Name = "Second Sheet" | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment