ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to create a new sheet in VBA? (https://www.excelbanter.com/excel-programming/305619-how-create-new-sheet-vba.html)

kvenku[_29_]

How to create a new sheet in VBA?
 
Hi,
I need a code to create a new sheet in the VBA.

Sheets.add is opening in between the existing sheets.
For eg. I have Sheet1,Sheet2,Sheet3
IN this case i if open the new sheet it is opening inbetween th
Sheet1 and Sheet2 where i need to open after the sheet3.

I feel that it is possible to do. Can you help me out ?
Thanks in advance

Regards
Venku

--
Message posted from http://www.ExcelForum.com


Leo Heuser[_3_]

How to create a new sheet in VBA?
 
Hi Venku

Try:

ActiveWorkbook.Sheets.Add After:=Worksheets("Sheet3")

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"kvenku " skrev i en meddelelse
...
Hi,
I need a code to create a new sheet in the VBA.

Sheets.add is opening in between the existing sheets.
For eg. I have Sheet1,Sheet2,Sheet3
IN this case i if open the new sheet it is opening inbetween the
Sheet1 and Sheet2 where i need to open after the sheet3.

I feel that it is possible to do. Can you help me out ?
Thanks in advance

Regards
Venku.


---
Message posted from http://www.ExcelForum.com/






All times are GMT +1. The time now is 05:43 PM.

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