Sub CopyRequsitionsToNewWorkSheet()
Dim NewName As String, nm As Name, wbNew As Workbook
Dim Sh As Worksheet
If MsgBox("Copy Requistion sheets to a new workbook" & vbCr & _
"Requistion will be copied unprotected, Sheets named the same" _
, vbYesNo, "NewCopy") = vbNo Then Exit Sub
Application.ScreenUpdating = False
'Copy specific sheets
'*SET THE SHEET NAMES TO COPY BELOW*
'Array("Sheet Name", "Another sheet name", "And Another"))
'Sheet names go inside quotes, seperated by commas
Set wbNew = Workbooks.Add
On Error GoTo ErrCatcher
For Each Sh In ThisWorkbook.Sheets(Array("Req Page 1", "Req Ext 1", "Req Ext 2"))
With wbNew
.Worksheets.Add before:=wbNew.Sheets(1)
.Sheets(1).Name = Sh.Name
End With
With Sh
.Unprotect
.Range("A1:AV60").Copy wbNew.Sheets(1).Range("A1")
.Protect
End With
Next Sh
On Error GoTo 0
'Paste sheets as values
'Remove External Links, Hperlinks and hard-code formulas
'Make sure A1 is selected on all sheets
For Each Sh In wbNew.Worksheets
With Sh
.Unprotect
.Cells.Copy
.[A1].PasteSpecial Paste:=xlValues
.Cells.Hyperlinks.Delete
Application.Goto .Cells(1, 1)
.Protect
End With
Next Sh
Cells(1, 1).Select
'Remove named ranges
For Each nm In wbNew.Names
nm.Delete
Next nm
'Input box to name new file
NewName = InputBox("Please Specify the name for the new Requistion", "New Copy")
'Save it with the NewName and in the same directory as original
With wbNew
.SaveCopyAs ThisWorkbook.Path & "\" & NewName & ".xls"
.Protect
.Close SaveChanges:=False
End With
Application.ScreenUpdating = True
Exit Sub
ErrCatcher:
MsgBox "Specified sheets do not exist within this workbook"
End Sub