View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
John John is offline
external usenet poster
 
Posts: 2,069
Default Moving rng of wrkshts to new workbook

another way maybe:

Sub MoveSheets()
Dim Arr() As String
'Create an Array
'of all Sheets
Dim N As Long
With ThisWorkbook.Worksheets
If .Count < 3 Then Exit Sub
ReDim Arr(2 To .Count - 1)
For N = 2 To .Count - 1
Arr(N) = .Item(N).Name
Next N
End With
Worksheets(Arr).Move
End Sub
--
jb


"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