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 Befo=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 Befo=Worksheets(1)
Sheets("MyOrigSheet").Visible = False
Sheets("MyOrigSheet(2)").Select
Sheets("MyOrigSheet(2)").Name = "MyNewSheet"
?
Thank you in advance.
Best Regards
Siri
--
SiriS
------------------------------------------------------------------------
SiriS's Profile:
http://www.excelforum.com/member.php...fo&userid=7995
View this thread:
http://www.excelforum.com/showthread...hreadid=509981