ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert Sheet (https://www.excelbanter.com/excel-programming/350794-insert-sheet.html)

STEVEB

Insert Sheet
 

Hi,

Is there a way to insert/add a sheet at the end of a workbook, without
knowing the # of sheets or the name of the sheets(The name & number of
sheets changes weekly)?

Any help would be greatly appreciated!


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=502573


Chip Pearson

Insert Sheet
 
Steve,

Try

With ThisWorkbook.Worksheets
.Add(after:=.Item(.Count)).Name = "New Name"
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"STEVEB"
wrote in message
...

Hi,

Is there a way to insert/add a sheet at the end of a workbook,
without
knowing the # of sheets or the name of the sheets(The name &
number of
sheets changes weekly)?

Any help would be greatly appreciated!


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile:
http://www.excelforum.com/member.php...fo&userid=1872
View this thread:
http://www.excelforum.com/showthread...hreadid=502573




STEVEB

Insert Sheet
 

Thanks Chip,

It worked great! I appreciate your help!


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=502573



All times are GMT +1. The time now is 02:59 AM.

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