View Full Version : Solved: Why am I getting an error?
What is causing an "Object Required" error on the second line of this code? Interestingly, the copy/paste actually occurs as desired, the error notwithstanding.
Range("A17").EntireRow.Copy
Range("A15").EntireRow.Insert(Shift:=xlDown).Paste
mikerickson
03-31-2012, 03:01 PM
Insert is a method that doesn't return an object. Hence the "Object requried" (for the .Paste method) error. Try
Range("A15").EntireRow.Insert Shift:=xlDown, CopyOrigin:=True
Insert is a method that doesn't return an object. Hence the "Object requried" (for the .Paste method) error. Try
Range("A15").EntireRow.Insert Shift:=xlDown, CopyOrigin:=True
Now I'm getting a "Named Argument not found" with respect to the "CopyOrigin". Does the recommended procedure only work on newer versions of Excel? I should have stated at the outset that I'm running Outlook 2000.
chamdan
03-31-2012, 03:06 PM
Use this instead.
Range("A15").Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Chuck
Thanks, chamdan. I was hoping to avoid having to use "Select." I think I have figured out how to make mikerickson's suggestion work.
Thanks, by the way, to mikerickson. I appreciate the help.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.