Paste special method failed...

  • Hi all -


    I keep receiving
    "Paste Special method of range class failed"


    I've tried re-writing the code several different ways,
    none of which works.


    Can you give me a pointer at what I'm doing wrong?


    Thanks
    -marc


    Code
    Workbooks("AR_Analyze.xls").Worksheets("SDX_AR").Range("A10").PasteSpecial _
         Paste:=xlValues, Operation:=xlNone, _
         SkipBlanks:=False, Transpose:=False
  • Re: Paste special method failed...


    Try this -


    Code
    Workbooks("AR_ANALYZE").Activate
        Sheets("SDX_AR").Select
        Range("A10").Select
        Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False _
            , Transpose:=False
  • Re: Paste special method failed...


    Timbo -


    Tried your code
    Came back Subscript out of range
    Highlighted here


    Code
    Workbooks("AR_ANALYZE").Activate


    I tried commenting the line out
    Came back with paste special method failed


    Also, most of what I've read on the forum suggests
    not using Select


    Indeed I ran into some problems with slow code execution
    due to select command.


    See my previous post Re: slow code execution.
    Thanks
    -marc

  • Re: Paste special method failed...


    Hi Norie -


    Here is the corrected code :


    Code
    Workbooks("AR_ANALYZE.xls").Activate
        Sheets("SDX_AR").Select
        Range("A10").Select
        Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False


    Still receive the "Paste special..." error


    To run
    Alt + F8 to activate macro menu
    Click macro
    Run


    The controlling macro actually calls several subprocedures
    of which the above is a part.


    Complete:


    OpenSelectedFile procedure is in a separate module.


    Thanks
    -marc

  • Re: Paste special method failed...


    I have the same error message with some code of mine. The line that gets highlighed is

    Code
    Selection.PasteSpecial Paste:=xlColumnWidths, Operation:=xlNone, _
            SkipBlanks:=False, Transpose:=False


    Here's the complete code:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!