+ Reply to Thread
Results 1 to 5 of 5

Macro to put the text into clipboard bug

  1. #1
    Registered User
    Join Date
    07-13-2015
    Location
    Slovakia
    MS-Off Ver
    2007, 2010, 2013
    Posts
    76

    Macro to put the text into clipboard bug

    Dear colleagues,

    I have an easy macro under the userform button (see below) that puts the text "Sample text" into the clipboard and I can then just ctrl+v is enywhere. However sometimes, especially when I restart the computer, and launch the excel with this userform, I got pasted the following instead of my text:

    ￿￿

    What can be the problem? How can it be fixed? Please help as I am due time soon

    Many many thanks and credits in advance.

    Please Login or Register  to view this content.
    Last edited by jj4jj; 08-15-2018 at 01:41 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2016 (Win 10 - Work) & 365 Subscription (Win 10 - Home)
    Posts
    30,408

    Re: Easy vba bug

    Please take a moment to re-read forum rule #1 and then amend your thread title to something that better explains your problem. If this were easy, you'd have worked it out for yourself! Changing your thread title is not optional, which means you must change it. Thanks!

    • Use concise, accurate thread titles.
    • Your post title should describe your problem, not your anticipated solution.
    • Use terms appropriate to a Google search - poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice tell us nothing.
    • Responding to a request to change your thread title by doing so is mandatory.

    To change a title go to your first post, click EDIT then Go Advanced and change your title.

    No help to be offered, please, until the OP complies with this request.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Registered User
    Join Date
    07-13-2015
    Location
    Slovakia
    MS-Off Ver
    2007, 2010, 2013
    Posts
    76

    Re: Easy vba bug

    Thanks, changed now.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    UK
    MS-Off Ver
    2010 primarily
    Posts
    3,044

    Re: Macro to put the text into clipboard bug

    It's a bug with Windows8 and later versions and the Dataobject - it seems to happen if you have file explorer windows open. The solution is to use API calls instead of the Dataobject. There's an example here.
    Rory
    Days when we raged, we flew off the page
    Such damage was done

  5. #5
    Registered User
    Join Date
    07-13-2015
    Location
    Slovakia
    MS-Off Ver
    2007, 2010, 2013
    Posts
    76

    Re: Macro to put the text into clipboard bug

    Hey Roya,

    you've hit the nail. As soon as the file explorer was closed the buttons became responsive. I will try to modify the code as per the suggestion in link and see if it will work.

    You got my thanks anyway.

+ 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