Excel 2000 problem copying drawingobjects between sheets

S

SiriS

Hello,
I have a problem in Excel 2000 during copying everything on a worksheet
to antoher worksheet (values in cells and textboxes).

To avoid the run-time error 1004 (from Microsofts Knowledge
Base-article - 177634) that occurrs if you copy the sheet over and over
again, following code is used:


Code:
--------------------
Sheets("MyOrigSheet").Visible = True
Sheets("MyOrigSheet").Select

'Add new sheet
Sheets.Add Before:=Sheets(1)

'Copy cells but not drawingobjects from original sheet
Sheets("MyOrigSheet").Cells.Copy

'Pasting cells on new sheet
Sheets(ActiveSheet.Name).Paste

'Copy drawingobjects (textboxes and buttons) from original sheet
Sheets("Sum per meas Grund").DrawingObjects.Copy

Sheets(ActiveSheet.Name).Paste

Sheets(ActiveSheet.Name).Select
Sheets(ActiveSheet.Name).Name = "MyNewSheet"
--------------------


Using Excel 2002 and Excel 2003 this works all fine. But not on Excel
2000.

Does not Drawingobjects exist in Excel 2000?

Do I have to check for version and then in case Excel 2000 use the
following code instead:

Sheets("MyOrigSheet").Copy Before:=Worksheets(1)
Sheets("MyOrigSheet").Visible = False
Sheets("MyOrigSheet(2)").Select
Sheets("MyOrigSheet(2)").Name = "MyNewSheet"

?

Thank you in advance.

Best Regards
Siri
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top