Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a VBA program that uses both "PasteSpecial" and "Paste" Methods.
I have no problem using the "PasteSpecial" Method as follows: Sheets("Val").Range("BE19:BE66").Copy Set MyRangePaste = Sheets("Save_Scen").Range("H124") MyRangePaste.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False I get an "Object doesn't support this property or object" error message, however, when I try to use the following that looks to me like a comparable command for the "Paste" method: Sheets("Val").Range("BE19:BE66").Copy Set MyRangePaste = Sheets("Save_Scen").Range("H124") MyRangePaste.Paste I would like to use the "Paste" method without "Selecting" a worksheet. How can I do this in a manner comparable to the above approach that I am using for the "PasteSpecial" method? Thanks much for any help. -- needVBAhelp |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this.
Sheets("Val").Range("BE19:BE66").Copy Destination:=Sheets("Save_Scen").Range("H124") "needVBAhelp" wrote: I have a VBA program that uses both "PasteSpecial" and "Paste" Methods. I have no problem using the "PasteSpecial" Method as follows: Sheets("Val").Range("BE19:BE66").Copy Set MyRangePaste = Sheets("Save_Scen").Range("H124") MyRangePaste.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False I get an "Object doesn't support this property or object" error message, however, when I try to use the following that looks to me like a comparable command for the "Paste" method: Sheets("Val").Range("BE19:BE66").Copy Set MyRangePaste = Sheets("Save_Scen").Range("H124") MyRangePaste.Paste I would like to use the "Paste" method without "Selecting" a worksheet. How can I do this in a manner comparable to the above approach that I am using for the "PasteSpecial" method? Thanks much for any help. -- needVBAhelp |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Following works. It is one line of code for copy/paste.
Set MyRangePaste = Sheets("Save_Scen").Range("H124") Sheets("Val").Range("BE19:BE66").Copy MyRangePaste -- Regards, OssieMac "needVBAhelp" wrote: I have a VBA program that uses both "PasteSpecial" and "Paste" Methods. I have no problem using the "PasteSpecial" Method as follows: Sheets("Val").Range("BE19:BE66").Copy Set MyRangePaste = Sheets("Save_Scen").Range("H124") MyRangePaste.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False I get an "Object doesn't support this property or object" error message, however, when I try to use the following that looks to me like a comparable command for the "Paste" method: Sheets("Val").Range("BE19:BE66").Copy Set MyRangePaste = Sheets("Save_Scen").Range("H124") MyRangePaste.Paste I would like to use the "Paste" method without "Selecting" a worksheet. How can I do this in a manner comparable to the above approach that I am using for the "PasteSpecial" method? Thanks much for any help. -- needVBAhelp |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To both Don and JLGWhiz:
Thanks much to both of you. Each of your suggestions worked beautifully. I had no idea how simple it could be to copy and paste!! Thanks again. -- needVBAhelp "JLGWhiz" wrote: Try this. Sheets("Val").Range("BE19:BE66").Copy Destination:=Sheets("Save_Scen").Range("H124") "needVBAhelp" wrote: I have a VBA program that uses both "PasteSpecial" and "Paste" Methods. I have no problem using the "PasteSpecial" Method as follows: Sheets("Val").Range("BE19:BE66").Copy Set MyRangePaste = Sheets("Save_Scen").Range("H124") MyRangePaste.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False I get an "Object doesn't support this property or object" error message, however, when I try to use the following that looks to me like a comparable command for the "Paste" method: Sheets("Val").Range("BE19:BE66").Copy Set MyRangePaste = Sheets("Save_Scen").Range("H124") MyRangePaste.Paste I would like to use the "Paste" method without "Selecting" a worksheet. How can I do this in a manner comparable to the above approach that I am using for the "PasteSpecial" method? Thanks much for any help. -- needVBAhelp |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OssieMac,
Thanks much. Your method works great as well. Very helpful to receive various solutions. Thanks again. -- needVBAhelp "OssieMac" wrote: Following works. It is one line of code for copy/paste. Set MyRangePaste = Sheets("Save_Scen").Range("H124") Sheets("Val").Range("BE19:BE66").Copy MyRangePaste -- Regards, OssieMac "needVBAhelp" wrote: I have a VBA program that uses both "PasteSpecial" and "Paste" Methods. I have no problem using the "PasteSpecial" Method as follows: Sheets("Val").Range("BE19:BE66").Copy Set MyRangePaste = Sheets("Save_Scen").Range("H124") MyRangePaste.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False I get an "Object doesn't support this property or object" error message, however, when I try to use the following that looks to me like a comparable command for the "Paste" method: Sheets("Val").Range("BE19:BE66").Copy Set MyRangePaste = Sheets("Save_Scen").Range("H124") MyRangePaste.Paste I would like to use the "Paste" method without "Selecting" a worksheet. How can I do this in a manner comparable to the above approach that I am using for the "PasteSpecial" method? Thanks much for any help. -- needVBAhelp |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error in Macro: "Method 'Paste' of object '_Worksheet' failed" | Excel Programming | |||
What is Error "Method "Paste" of object "_Worksheet" failed? | Excel Programming | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) | |||
XL2003 "paste method of worksheet class failed" | Excel Programming | |||
Getting "compile error" "method or data member not found" on reinstall | Excel Programming |