ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding sheet (https://www.excelbanter.com/excel-programming/364648-adding-sheet.html)

Greg[_27_]

Adding sheet
 
Hi all,

A really basic one here but i am stumped, how do i get a macro to insert a
worksheet to the end of the workbook.

Thanks in advance

Greg



Leith Ross[_582_]

Adding sheet
 

Hello Greg,

Here's the code...

Sub AddSheet()
Worksheets.Add.Move after:=Worksheets(Worksheets.Count)
End

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=553102


Greg[_27_]

Adding sheet
 
Thanks Leith


"Leith Ross" wrote
in message ...

Hello Greg,

Here's the code...

Sub AddSheet()
Worksheets.Add.Move after:=Worksheets(Worksheets.Count)
End

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile:
http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=553102





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

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