+ Reply to Thread
Results 1 to 7 of 7

Run-Time Error 438

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,963

    Run-Time Error 438

    I'm getting a "Object doesn't support this property or method" error on the below line of code:

    Please Login or Register  to view this content.
    The scenario is I'm copying a column from on sheet, and want to paste it on another, to the right of the other columns already there. The code worked fine last week, now here we are a week later, no other changes, and it throws up an error. Any help on this would be greatly appreciated.

    Here's more of the pertinent code:

    Please Login or Register  to view this content.
    Last edited by jomili; 03-07-2011 at 10:19 AM.

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Run-Time Error 438

    Hi,

    A range doesn't have a paste method which is why you get the error.

    Here's one alternative:
    Please Login or Register  to view this content.
    Last edited by Colin Legg; 03-04-2011 at 06:37 PM.
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,963

    Re: Run-Time Error 438

    Colin,

    That did the trick just right. Thank you very much.

    On the "Range doesn't have a paste method", why did the code right before my bad code work? It's identical in structure, other than having a range of cells to copy/paste rather than a single cell, plus being a pastespecial.

  4. #4
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Run-Time Error 438

    Hi,

    On the "Range doesn't have a paste method", why did the code right before my bad code work?
    Right before it is Range.PasteSpecial rather than Range.Paste
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,963

    Re: Run-Time Error 438

    So, I guess "Paste" is a completely different animal than "PasteSpecial", at least as far as the "Range" property is concerned?

  6. #6
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Run-Time Error 438

    Yes, exactly - if you like you could say that Range's can't Paste.

    Other things can Paste - for example, a Worksheet - but not a Range.

  7. #7
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,963

    Re: Run-Time Error 438

    Thanks Colin; those are the types of things that are REALLY valuable to learn. I appreciate the help.

    Thanks,
    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1