Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to populate many worksheets in a workbook chrisk Excel Discussion (Misc queries) 4 August 29th 08 01:37 PM
trying to make several worksheets populate names to another [email protected] Excel Worksheet Functions 0 February 26th 08 07:42 PM
How to automatically create and populate worksheets? anthonyberet Excel Programming 4 May 25th 06 12:06 AM
How can I populate text accross worksheets? Brian Foss Excel Discussion (Misc queries) 1 March 21st 05 11:34 PM
Auto populate and calculate between worksheets. Ry[_2_] Excel Programming 0 October 27th 04 01:28 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"