View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default Moving rng of wrkshts to new workbook

Hi

Sub MoveSheets()
Dim wb As Workbook
Dim NewWb As Workbook

Set wb = ThisWorkbook
Set NewWb = Workbooks.Add

wb.Activate
For Each sh In wb.Sheets
If sh.Name < "Start" And sh.Name < "End" Then
sh.Move after:=NewWb.Sheets(Sheets.Count)
End If
Next
End Sub

Regards,
Per

On 7 Dec., 19:53, pickytweety
wrote:
Hi,
I have a worksheet named "Start" and a worksheet named "End". *In between
these two worksheets there are a series of other worksheets that a macro
builds. *The number of sheets and the names of the sheets change depending on
a macro that is run. *How do I select all the sheets between "Start" and
"End" and move them (not copy, but move) to a new workbook? *
--
Thanks,
PTweety