ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying a worksheet (https://www.excelbanter.com/excel-programming/352878-copying-worksheet.html)

SusieQ[_5_]

Copying a worksheet
 

Hi,

I need to copy a worksheet and paste it in between another two in the
same workbook. I need to copy the whole worksheet so that all the page
setup and print area settings are the same.

This step will be part of a larger piece of code so I need to use VBA.

Any help appreciated.
Thanks
SusieQ


--
SusieQ
------------------------------------------------------------------------
SusieQ's Profile: http://www.excelforum.com/member.php...o&userid=30818
View this thread: http://www.excelforum.com/showthread...hreadid=510569


Ron de Bruin

Copying a worksheet
 
hi Susie

You can use this to copy the activesheet after a sheet named "Sheet2"

ActiveSheet.Copy after:=Sheets("Sheet2")


--
Regards Ron de Bruin
http://www.rondebruin.nl


"SusieQ" wrote in message
...

Hi,

I need to copy a worksheet and paste it in between another two in the
same workbook. I need to copy the whole worksheet so that all the page
setup and print area settings are the same.

This step will be part of a larger piece of code so I need to use VBA.

Any help appreciated.
Thanks
SusieQ


--
SusieQ
------------------------------------------------------------------------
SusieQ's Profile: http://www.excelforum.com/member.php...o&userid=30818
View this thread: http://www.excelforum.com/showthread...hreadid=510569





All times are GMT +1. The time now is 07:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com