ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy Worksheets Error #1004 Work Around (https://www.excelbanter.com/excel-programming/329363-copy-worksheets-error-1004-work-around.html)

Jim Wiley

Copy Worksheets Error #1004 Work Around
 
Hi,
I have a workbook that has hidden sheets that I repeatedly copy and rename.
I them populate them with data from a web page. I am planning to use a
variation of the work around method from 'XL2000: Copying Worksheet
Programmatically Causes Run-Time Error 1004' - 210684.

Can I create a template from my existing workbook and place my worksheets
that I have been copying and renaming in the template. I would like to import
them back into my primary workbook and rename them.

Will I have problems with the programing, menus and buttons that are part of
those sheets?

Is there any thing special I should be concerned with importing those sheets
from the template?

Why does it have to be a template? (I don't have a centeral site to palce
the template).

Thanks,
Jim Wiley


Ron de Bruin

Copy Worksheets Error #1004 Work Around
 
Hi Jim

You can save each sheet in his own workbook as a template
Use buttons from the control toolbox and put your code in the click event

Insert a sheet like this

Sheets.Add Type:=Application.TemplatesPat*h & "\xxxxx.xlt"

I think you have no problem with the 1004 error but I never try to add many sheets like this



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jim Wiley" <Jim wrote in message ...
Hi,
I have a workbook that has hidden sheets that I repeatedly copy and rename.
I them populate them with data from a web page. I am planning to use a
variation of the work around method from 'XL2000: Copying Worksheet
Programmatically Causes Run-Time Error 1004' - 210684.

Can I create a template from my existing workbook and place my worksheets
that I have been copying and renaming in the template. I would like to import
them back into my primary workbook and rename them.

Will I have problems with the programing, menus and buttons that are part of
those sheets?

Is there any thing special I should be concerned with importing those sheets
from the template?

Why does it have to be a template? (I don't have a centeral site to palce
the template).

Thanks,
Jim Wiley





All times are GMT +1. The time now is 09:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com