Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create worksheets and populate
How can I programatically (vb or macro) create new worksheets (ideally based
on a template) on my workbook and populate that new worksheets from a list of data? Thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create worksheets and populate
Alberto,
Try some code like the following: With ActiveWorkbook.Worksheets Workbooks("Templ.xls").Worksheets("Template").Copy after:=.Item(.Count) .Item(.Count).Select End With This will copy the worksheet named "Template" from the workbook "Templ.xls" to the ActiveWorkbook. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com (email address is on the web site) "Alberto Pinto" wrote in message ... How can I programatically (vb or macro) create new worksheets (ideally based on a template) on my workbook and populate that new worksheets from a list of data? Thanks in advance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create worksheets and populate
Great! Thanks.
Do you know how can i rename and move the new worksheet? where can i get the list of macros methods and properties available on Excel ? "Chip Pearson" wrote in message ... Alberto, Try some code like the following: With ActiveWorkbook.Worksheets Workbooks("Templ.xls").Worksheets("Template").Copy after:=.Item(.Count) .Item(.Count).Select End With This will copy the worksheet named "Template" from the workbook "Templ.xls" to the ActiveWorkbook. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com (email address is on the web site) "Alberto Pinto" wrote in message ... How can I programatically (vb or macro) create new worksheets (ideally based on a template) on my workbook and populate that new worksheets from a list of data? Thanks in advance |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create worksheets and populate
Alberto,
Record a macro of your actions, ToolsMacroRecord New Macro.. Check the Help and Object Browser. NickHK "Alberto Pinto" wrote in message ... Great! Thanks. Do you know how can i rename and move the new worksheet? where can i get the list of macros methods and properties available on Excel ? "Chip Pearson" wrote in message ... Alberto, Try some code like the following: With ActiveWorkbook.Worksheets Workbooks("Templ.xls").Worksheets("Template").Copy after:=.Item(.Count) .Item(.Count).Select End With This will copy the worksheet named "Template" from the workbook "Templ.xls" to the ActiveWorkbook. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com (email address is on the web site) "Alberto Pinto" wrote in message ... How can I programatically (vb or macro) create new worksheets (ideally based on a template) on my workbook and populate that new worksheets from a list of data? Thanks in advance |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create worksheets and populate
This can be a very simple question but I can't find information about the
Worksheet(neither about the workbook or others) object in VB for Office Help or Excel Help. Where can I find this info? "NickHK" wrote in message ... Alberto, Record a macro of your actions, ToolsMacroRecord New Macro.. Check the Help and Object Browser. NickHK "Alberto Pinto" wrote in message ... Great! Thanks. Do you know how can i rename and move the new worksheet? where can i get the list of macros methods and properties available on Excel ? "Chip Pearson" wrote in message ... Alberto, Try some code like the following: With ActiveWorkbook.Worksheets Workbooks("Templ.xls").Worksheets("Template").Copy after:=.Item(.Count) .Item(.Count).Select End With This will copy the worksheet named "Template" from the workbook "Templ.xls" to the ActiveWorkbook. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com (email address is on the web site) "Alberto Pinto" wrote in message ... How can I programatically (vb or macro) create new worksheets (ideally based on a template) on my workbook and populate that new worksheets from a list of data? Thanks in advance |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create worksheets and populate
In the VBE, got to Help and type "Object Model"
NickHK "Alberto Pinto" wrote in message ... This can be a very simple question but I can't find information about the Worksheet(neither about the workbook or others) object in VB for Office Help or Excel Help. Where can I find this info? "NickHK" wrote in message ... Alberto, Record a macro of your actions, ToolsMacroRecord New Macro.. Check the Help and Object Browser. NickHK "Alberto Pinto" wrote in message ... Great! Thanks. Do you know how can i rename and move the new worksheet? where can i get the list of macros methods and properties available on Excel ? "Chip Pearson" wrote in message ... Alberto, Try some code like the following: With ActiveWorkbook.Worksheets Workbooks("Templ.xls").Worksheets("Template").Copy after:=.Item(.Count) .Item(.Count).Select End With This will copy the worksheet named "Template" from the workbook "Templ.xls" to the ActiveWorkbook. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com (email address is on the web site) "Alberto Pinto" wrote in message ... How can I programatically (vb or macro) create new worksheets (ideally based on a template) on my workbook and populate that new worksheets from a list of data? Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to populate many worksheets in a workbook | Excel Discussion (Misc queries) | |||
trying to make several worksheets populate names to another | Excel Worksheet Functions | |||
How to automatically create and populate worksheets? | Excel Programming | |||
How can I populate text accross worksheets? | Excel Discussion (Misc queries) | |||
Auto populate and calculate between worksheets. | Excel Programming |