+ Reply to Thread
Results 1 to 4 of 4

Having trouble using clipboard data in Find function

  1. #1
    Registered User
    Join Date
    06-28-2013
    Location
    Fort Mill, SC
    MS-Off Ver
    Excel 2010
    Posts
    17

    Having trouble using clipboard data in Find function

    When I execute this code, I get this error: Runtime Error 438, Object doesn't support this property or method

    Please Login or Register  to view this content.
    Basically, what I'm trying to do is grab the value of the first cell of the last row in Sheet1, then find the cell with that value in Sheet2. I put a breakpoint in "MyData.GetFromClipboard" and the code seems to crash in the Cells.Find block. I copied that block from a macro I recorded where I manually opened the Find function and looked for a value, then just replaced the value in the macro with the name of the DataObject variable.
    Last edited by Leith Ross; 06-28-2013 at 02:11 PM. Reason: Added Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Having trouble using clipboard data in Find function

    Hello RollerRagerMD,

    Welcome to the Forum!

    I am not sure why you want to use the data object to simply transfer text from one cell to another. You can make the assignment directly from one cell to the other.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-28-2013
    Location
    Fort Mill, SC
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Having trouble using clipboard data in Find function

    Thanks for the welcome!

    I admit that I'm not sure why I'm using it either. I did some Google searches and that was one of the solutions posted on another website for someone with a similar objective. If there's an easier way to do it, I'd appreciate it if you'd show me how. I'm a complete novice when it comes to VBA (I took a semester of Visual Basic but this is a whole 'nother ballgame!).

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Having trouble using clipboard data in Find function

    Hello RollerRagerMD,

    Sorry about the delay, I had to feed my dog and give her medicine. If you don't need to copy the cell formatting then you can transfer the text this way...
    Please Login or Register  to view this content.
    EDIT NOTE: Forgot to add the "SET" statement before LastCell.
    Last edited by Leith Ross; 06-28-2013 at 03:43 PM.

+ 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