ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA - Insert new sheet as the last sheet (https://www.excelbanter.com/excel-programming/311092-vba-insert-new-sheet-last-sheet.html)

MoonWeazel[_7_]

VBA - Insert new sheet as the last sheet
 

Good Morning All,

I have a spreadsheet with a lovely piece of code that inserts a shee
into the workbook via a button.

The sheet is inserted to the left of the sheet with the button.

Is there a way to get the sheet to be inserted to the right of th
sheet with the button?

I am probably being a bit thick - I apologise in advance!!

Thanks,

MoonWeaze

--
MoonWeaze
-----------------------------------------------------------------------
MoonWeazel's Profile: http://www.excelforum.com/member.php...nfo&userid=211
View this thread: http://www.excelforum.com/showthread.php?threadid=26273


Norman Jones

VBA - Insert new sheet as the last sheet
 
Hi Moon Weazel,


ActiveWorkbook.Worksheets.Add After:=ActiveSheet


---
Regards,
Norman



"MoonWeazel" wrote in message
...

Good Morning All,

I have a spreadsheet with a lovely piece of code that inserts a sheet
into the workbook via a button.

The sheet is inserted to the left of the sheet with the button.

Is there a way to get the sheet to be inserted to the right of the
sheet with the button?

I am probably being a bit thick - I apologise in advance!!

Thanks,

MoonWeazel


--
MoonWeazel
------------------------------------------------------------------------
MoonWeazel's Profile:
http://www.excelforum.com/member.php...fo&userid=2119
View this thread: http://www.excelforum.com/showthread...hreadid=262739





All times are GMT +1. The time now is 07:36 PM.

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