Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, Many thanks to Ryan for help on Deleting tabs.
I am now after a way of selecting all tabs regardless of amount after a certain tab. The reason for this, is so that I can copy to a new workbook. Again, many thanks for help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John,
The macro below will copy sheets from the activesheet to a new workbook. HTH, Bernie MS Excel MVP Sub SelectFromCurrentSheet2End() Dim i As Integer 'if multiple sheet are selected, just select the activesheet to start ActiveSheet.Select True For i = ActiveSheet.Index To Sheets.Count Sheets(i).Select False Next i ActiveWindow.SelectedSheets.Copy 'Create the new workbook End Sub "JohnUK" wrote in message ... Hi, Many thanks to Ryan for help on Deleting tabs. I am now after a way of selecting all tabs regardless of amount after a certain tab. The reason for this, is so that I can copy to a new workbook. Again, many thanks for help |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oops - left out some of my explanation:
The macro below will copy sheets, from the activesheet to the last sheet, to a new workbook. HTH, Bernie MS Excel MVP "Bernie Deitrick" <deitbe @ consumer dot org wrote in message ... John, The macro below will copy sheets from the activesheet to a new workbook. HTH, Bernie MS Excel MVP Sub SelectFromCurrentSheet2End() Dim i As Integer 'if multiple sheet are selected, just select the activesheet to start ActiveSheet.Select True For i = ActiveSheet.Index To Sheets.Count Sheets(i).Select False Next i ActiveWindow.SelectedSheets.Copy 'Create the new workbook End Sub "JohnUK" wrote in message ... Hi, Many thanks to Ryan for help on Deleting tabs. I am now after a way of selecting all tabs regardless of amount after a certain tab. The reason for this, is so that I can copy to a new workbook. Again, many thanks for help |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Look at this: Sub CopyTabs() Dim ShArr() AfterSh = Worksheets("Sheet3").Index NumOfShToCopy = Worksheets.Count - AfterSh ReDim ShArr(1 To NumOfShToCopy) For Sh = 1 To NumOfShToCopy ShArr(Sh) = Worksheets(Sh + AfterSh).Name Next Sheets(ShArr).Copy End Sub Regards, Per "JohnUK" skrev i meddelelsen ... Hi, Many thanks to Ryan for help on Deleting tabs. I am now after a way of selecting all tabs regardless of amount after a certain tab. The reason for this, is so that I can copy to a new workbook. Again, many thanks for help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select and copy certain tabs using macro | Excel Programming | |||
Select certain tabs using macro | Excel Programming | |||
Select Various tabs using VBA | Excel Programming | |||
Select Various tabs using VBA | Excel Programming | |||
Need help with using VBA to select tabs in Excel | Excel Programming |