Hi Mick,
Thanks for helping. Where do I place this code?
Dim Rng As String, Dn As Range, R, Fst As Integer, Lst As Integer
Dim Pst As Integer, c As Integer, Rep As String
On Error Resume Next
Rng = Application.InputBox(prompt:="Please enter Sheets as 2/2, 1/5, 8/20 etc.", Title:="Copy Sheets to New Workbook", Type:=2)
Rep = Replace(Rng, "/", "_")
R = InStr(Rng, "/")
If R = 0 Then
MsgBox "Please enter Sheets as 2/2, 1/5, 8/20 etc."
Exit Sub
End If
Fst = Left(Rng, R - 1)
Lst = Right(Rng, Len(Rng) - R)
If Lst > Worksheets.Count Then
MsgBox "Selection out of Range"
Exit Sub
End If
and this code to?
Dim NewWorkbook As Workbook
Dim Basebook As Workbook, sht As Range
Dim AddSht As Integer
Set Basebook = ThisWorkbook
Set NewWorkbook = Workbooks.Add
AddSht = Lst - Fst + 1
If AddSht > 3 Then
AddSht = AddSht + 3
Else
AddSht = 0
End If
Application.SheetsInNewWorkbook = AddSht
For Pst = Fst To Lst
c = c + 1
Basebook.Sheets(Pst).Cells.Copy NewWorkbook.Sheets("sheet" & c).Range("A1")
Next Pst
NewWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\NewBk " & Rep & ".xls"
Workbooks("NewBk " & Rep & ".xls").Close
Sincerely,
Becky
Bookmarks