ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   New WorkBook With Specified Number of Sheets (https://www.excelbanter.com/excel-programming/437438-new-workbook-specified-number-sheets.html)

Faraz A. Qureshi

New WorkBook With Specified Number of Sheets
 
Sure would oblige if the proper complete syntax is provided in respect of
Creating a New Workbook with a specified number of sheets.

Thanx in advance!
--
Best Regards,

Faraz

Benito Merino

New WorkBook With Specified Number of Sheets
 
On 15 dic, 11:23, Faraz A. Qureshi
wrote:
Sure would oblige if the proper complete syntax is provided in respect of
Creating a New Workbook with a specified number of sheets.

Thanx in advance!
--
Best Regards,

Faraz


Hello.

One way is:

Sub newworkbook()
pastsheets = Application.SheetsInNewWorkbook
newsheets = 3
Application.SheetsInNewWorkbook = newsheets
Workbooks.Add
Application.SheetsInNewWorkbook = pastsheets

End Sub

Regards,

Benito
Barcelona


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

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