View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
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