Select the ActiveSheet & the sheet next to it

  • Thread starter Thread starter Dolphinv4
  • Start date Start date
D

Dolphinv4

Hi,

how do I have a macro to select the activesheet and the sheet next to it and
then to copy them and insert as new sheets (both of them)? Note that for the
macro, i do not want it to have specific Named sheets.

Thanks.
 
You left out a few minor details but this should get you to the right place.
Selects the active sheet and the one next to it (to the right) and copies to
a new workbook.
Sub selectSheets()

isheet1 = ActiveSheet.Index
isheet2 = ActiveSheet.Index + 1

Sheets(Array(isheet1, isheet2)).Select

Sheets(Array(isheet1, isheet2)).Copy

End Sub
 
Back
Top