ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert multi spreadsheet (https://www.excelbanter.com/excel-programming/426337-insert-multi-spreadsheet.html)

inungh

Insert multi spreadsheet
 
I need insert about 20 spreadsheet for my report every day.
I just wanted to know is it possible to insert all 20 pages in one
shot?

Your information is great appreciated,

[email protected]

Insert multi spreadsheet
 
On Apr 1, 8:48*am, inungh wrote:
I need insert about 20 spreadsheet for my report every day.
I just wanted to know is it possible to insert all 20 pages in one
shot?

Your information is great appreciated,

Inungh,

Use the count argument of the Add method for worksheets, e.g.
Worksheets.Add Count:=20.

Best,

Matt Herbert

inungh

Insert multi spreadsheet
 
On Apr 1, 8:59*am, wrote:
On Apr 1, 8:48*am, inungh wrote: I need insert about 20 spreadsheet for my report every day.
I just wanted to know is it possible to insert all 20 pages in one
shot?


Your information is great appreciated,


Inungh,

Use the count argument of the Add method for worksheets, e.g.
Worksheets.Add Count:=20.

Best,

Matt Herbert

Thanks millions,


inungh

Insert multi spreadsheet
 
On Apr 1, 8:59*am, wrote:
On Apr 1, 8:48*am, inungh wrote: I need insert about 20 spreadsheet for my report every day.
I just wanted to know is it possible to insert all 20 pages in one
shot?


Your information is great appreciated,


Inungh,

Use the count argument of the Add method for worksheets, e.g.
Worksheets.Add Count:=20.

Best,

Matt Herbert


Thanks again,
I would like to rename all the spreadsheet from a list of cells.
Can you please show me how to rename the spreadsheet?

Thanks again,


John

Insert multi spreadsheet
 
something like following may do what you want:

Sub AddSheets()
Dim sheetname As Range
Dim NewWs As Worksheet

With ThisWorkbook

For na = 1 To 20

'the worksheet & range where list of names are stored
'change as required
Set sheetname = .Worksheets("Sheet1").Range("A" & na)

If Not IsEmpty(sheetname.Value) Then

Set NewWs = .Worksheets.Add

NewWs.Move After:=.Worksheets(.Worksheets.Count)

NewWs.Name = sheetname.Value

End If

Next

End With

End Sub

I have assumed your sheet names are in Col A of worksheet named Sheet1.
Change as required.
--
jb


"inungh" wrote:

On Apr 1, 8:59 am, wrote:
On Apr 1, 8:48 am, inungh wrote: I need insert about 20 spreadsheet for my report every day.
I just wanted to know is it possible to insert all 20 pages in one
shot?


Your information is great appreciated,


Inungh,

Use the count argument of the Add method for worksheets, e.g.
Worksheets.Add Count:=20.

Best,

Matt Herbert


Thanks again,
I would like to rename all the spreadsheet from a list of cells.
Can you please show me how to rename the spreadsheet?

Thanks again,



inungh

Insert multi spreadsheet
 
On Apr 1, 11:52*am, john wrote:
something like following may do what you want:

Sub AddSheets()
* * Dim sheetname As Range
* * Dim NewWs As Worksheet

* * With ThisWorkbook

* * * * For na = 1 To 20

* * * * * * 'the worksheet & range where list of names are stored
* * * * * * 'change as required
* * * * * * Set sheetname = .Worksheets("Sheet1").Range("A" & na)

* * * * * * If Not IsEmpty(sheetname.Value) Then

* * * * * * * * Set NewWs = .Worksheets.Add

* * * * * * * * NewWs.Move After:=.Worksheets(.Worksheets.Count)

* * * * * * * * NewWs.Name = sheetname.Value

* * * * * * End If

* * * * * * Next

* * * * End With

* * End Sub

I have assumed your sheet names are in Col A of worksheet named Sheet1.
Change as required.
--
jb



"inungh" wrote:
On Apr 1, 8:59 am, wrote:
On Apr 1, 8:48 am, inungh wrote: I need insert about 20 spreadsheet for my report every day.
I just wanted to know is it possible to insert all 20 pages in one
shot?


Your information is great appreciated,


Inungh,


Use the count argument of the Add method for worksheets, e.g.
Worksheets.Add Count:=20.


Best,


Matt Herbert


Thanks again,
I would like to rename all the spreadsheet from a list of cells.
Can you please show me how to rename the spreadsheet?


Thanks again,- Hide quoted text -


- Show quoted text -


Thanks millions,


All times are GMT +1. The time now is 02:45 PM.

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