ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy to end (https://www.excelbanter.com/excel-programming/342184-copy-end.html)

comotoman[_6_]

Copy to end
 

my line is:
Sheets("Sheet 1").Copy After:=Sheets(3)

This is part of a sheet copy macro, I need it to copy "sheet 1" to the
end, not after sheets(3). The workbook can have 40+sheets. Any help
would be great!!!


--
comotoman
------------------------------------------------------------------------
comotoman's Profile: http://www.excelforum.com/member.php...o&userid=27292
View this thread: http://www.excelforum.com/showthread...hreadid=474121


Jim Rech

Copy to end
 
Sheets("Sheet 1").Copy After:=Sheets(Sheets.Count)


The default sheet name is "Sheet1" so I assume you changed the sheet name to
have a space before the "1".

--
Jim
"comotoman" wrote
in message ...
|
| my line is:
| Sheets("Sheet 1").Copy After:=Sheets(3)
|
| This is part of a sheet copy macro, I need it to copy "sheet 1" to the
| end, not after sheets(3). The workbook can have 40+sheets. Any help
| would be great!!!
|
|
| --
| comotoman
| ------------------------------------------------------------------------
| comotoman's Profile:
http://www.excelforum.com/member.php...o&userid=27292
| View this thread: http://www.excelforum.com/showthread...hreadid=474121
|



Tom Ogilvy

Copy to end
 
Sheets("Sheet 1").Copy After:=Sheets(sheets.count)

--
Regards,
Tom Ogilvy

"comotoman" wrote
in message ...

my line is:
Sheets("Sheet 1").Copy After:=Sheets(3)

This is part of a sheet copy macro, I need it to copy "sheet 1" to the
end, not after sheets(3). The workbook can have 40+sheets. Any help
would be great!!!


--
comotoman
------------------------------------------------------------------------
comotoman's Profile:

http://www.excelforum.com/member.php...o&userid=27292
View this thread: http://www.excelforum.com/showthread...hreadid=474121





All times are GMT +1. The time now is 10:31 AM.

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