Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Newsgroup,
I have created some template worksheets in my Excel VBA projekt and want to duplicate them. How can I do that without errors? 1. Try: Simply use method copy. I got this error if I execute this code some times: Worksheets("Template1").Copy(, Worksheets(Worksheets.count)) 'Error: 1004: "Copy Method of Worksheet Class failed" I have found this help page from MS: http://support.microsoft.com/default...b;en-us;210684 But I'm not using named ranges. 2. I have tried to create a new worksheet and place the a range from the template on it: Set NewSheet = Worksheets.Add Worksheets(sTemplateSheet).Range("A1:V127").Copy NewSheet But If execute this code in a loop to create all new tables, Excel crashes down. 3. I have create a new Workbook with all template sheets an have copied the templates also in my main sheet. The same error as in 1. appears. What can I do to create sheets by template? I there a hint? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting Duplicate Data in Two Worksheets | Excel Discussion (Misc queries) | |||
Duplicate worksheets | Excel Discussion (Misc queries) | |||
Duplicate Worksheets XLS:1 and XLS:2 | Excel Discussion (Misc queries) | |||
Duplicate Worksheets | Excel Discussion (Misc queries) | |||
checking for duplicate worksheets | Excel Programming |