Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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, |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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, |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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, |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I add footnotes to a multi-page spreadsheet? | Excel Discussion (Misc queries) | |||
Reporting on multi worksheet spreadsheet | Excel Worksheet Functions | |||
Print multi invoices from a spreadsheet | Excel Worksheet Functions | |||
insert rows in multi sheets | Excel Programming | |||
Creating a multi-user spreadsheet | Excel Programming |