Homer@bmwc.b
01-16-2009, 01:19 PM
the Microsoft KB acknowledges that a 1004 error can occur when the action of copying and inserted a worksheet is performed multiple times in a workbook. MS:KB:Q210684
They provide a proposed fix but it seems like only a partial fix. Their fix is that you can copy the worksheet from an XLT file.
So far so good. This works great if the XLT file contains only one worksheet.
What I have been trying to extend from their method is to be able to programmicly choose which worksheet I want to copy from the template.
Ideally I would like to pass a variable name with the sheet name and get exactly that sheet inserted in my open workbook.
So far I have been flumoxed in all attempts.
One option would seem to be to put every worksheet I might want to copy in its own template file and then programically call for the sheet from that workbook. I think I could do this but find it distasteful because of the number of files I would have to support for a large number of users.
Any ideas?
John Homer
Homer@bmwc.biz
They provide a proposed fix but it seems like only a partial fix. Their fix is that you can copy the worksheet from an XLT file.
So far so good. This works great if the XLT file contains only one worksheet.
What I have been trying to extend from their method is to be able to programmicly choose which worksheet I want to copy from the template.
Ideally I would like to pass a variable name with the sheet name and get exactly that sheet inserted in my open workbook.
So far I have been flumoxed in all attempts.
One option would seem to be to put every worksheet I might want to copy in its own template file and then programically call for the sheet from that workbook. I think I could do this but find it distasteful because of the number of files I would have to support for a large number of users.
Any ideas?
John Homer
Homer@bmwc.biz