Copy/Paste Using 2000

T

Tim Rush

Since we still have a lot of systems using Office 2000, I'm forced to write
code for that. I have the following:
Rows(r).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Unfortuantely the CopyOrigin or more exact the xlFormatFromLeftOrAbove is
not recognized as valid within 2000, but works fine in my 2003. Can anyone
suggest another method of duplicating a line above the selected cell
(formulas only, not the data).

Tim
 
J

Jim Cone

Tim,
Rows(r).Copy Rows(r + 1)
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Tim Rush"
wrote in message
Since we still have a lot of systems using Office 2000, I'm forced to write
code for that. I have the following:
Rows(r).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Unfortuantely the CopyOrigin or more exact the xlFormatFromLeftOrAbove is
not recognized as valid within 2000, but works fine in my 2003. Can anyone
suggest another method of duplicating a line above the selected cell
(formulas only, not the data).
Tim
 
J

Jim Cone

This is the complete version...
Rows(r + 1).Insert shift:=xlDown
Rows(r).Copy Rows(r + 1)
 
T

Tim Rush

Thans Jim, unfortuantely, that duplicates the line. I want to insert a blank
line with all the formatting of the line above it. Carry down the
conditional formats and formuals.
 
J

Jim Cone

You cannot "carry down" formulas and not expect them to return a result,
no matter what XL version you use.
The following keeps cell formatting / conditional formatting intact...
'--
Rows(r + 1).Insert shift:=xlDown
Rows(r).Copy Rows(r + 1)
Rows(r + 1).ClearContents
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Tim Rush"
wrote in message
Thans Jim, unfortuantely, that duplicates the line. I want to insert a blank
line with all the formatting of the line above it. Carry down the
conditional formats and formuals.
 

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