+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Copy Data From Textboxes In A Userform To Clipboard

  1. #1
    Registered User
    Join Date
    08-12-2010
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    4

    Copy Data From Textboxes In A Userform To Clipboard

    Hello All,

    I've searched the forums for an answer to my problem and can not find it. And please bear with me, I am a complete newbie. I'm a credit analyst and am looking for a way to simplify my job.

    Is there a way to copy entries from multiple textboxes in a userform to a clipboard so that they can be pasted into another application?

    It seemed pretty easy at 1st. The gentleman at this website seems to have an answer but I keep getting a 424 error when assigning his code to a command button w/no changes. I just wanted to see if it worked: http://www.cpearson.com/excel/Clipboard.aspx
    Please Login or Register  to view this content.
    I was able to steal code from various sources to get what I needed in simple form (pasting the userform data to a worksheet and clearing the userform), but this is killing me. Help!

    BTW, I uploaded what I have so far. I don't think anyone wants to see it or needs to just yet, but I didn't want to get slammed. It's not Mona Lisa, but in the end I hope it will be.
    Attached Files Attached Files
    Last edited by BiggTimm; 08-19-2010 at 01:09 PM.

  2. #2
    Registered User
    Join Date
    08-12-2010
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Copy Data From Textboxes In A Userform To Clipboard

    wow! no one????

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Copy Data From Textboxes In A Userform To Clipboard

    probably because it's not clear what you want.

    this code revision will place some text on the clipboard.

    Please Login or Register  to view this content.
    Depending on what you want comment out one of the lines that builds the variable strText

    To use, show userform - press Copy All button - close userform - paste in to excel.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    08-12-2010
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Copy Data From Textboxes In A Userform To Clipboard

    Thanks for the response Andy! I thought I was very clear as to what I wanted. Sorry folks!
    All I want is to be able to click the "Copy All" command button in my attachment so that when clicked, it will copy all of the information from what was entered into my Userform's TextBoxes onto the Window's Clipboard so that I can paste it into a completely different application that I use at work. Right now there are 8 TextBoxes on the Userform.
    I already have a Command Button on my Userform that will put the TextBox info into it's corresponding column on my worksheet.
    Hope this is clearer now, and thanks!

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Copy Data From Textboxes In A Userform To Clipboard

    Must have been some other reason why you got no replys then

    Did you try my example code?

    Instead of S1 and S2 replace those with the textbox names

    Please Login or Register  to view this content.
    You will need to name the remaining textboxes and change the names if applicable.
    Last edited by Andy Pope; 08-19-2010 at 10:54 AM.

  6. #6
    Registered User
    Join Date
    08-12-2010
    Location
    Cleveland, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Copy Data From Textboxes In A Userform To Clipboard

    Thanks Andy!!! It works like a charm now!!!

  7. #7
    Registered User
    Join Date
    08-19-2013
    Location
    n/z
    MS-Off Ver
    Excel 2011
    Posts
    1

    Re: Excel 2007 : Copy Data From Textboxes In A Userform To Clipboard

    Ive been looking for this for while now so thank you

    Was wondering if someone could help me extend the range in which i can copy as i want to copy mutliple labels and text boxes.

    this is a incorrect example

    Please Login or Register  to view this content.
    Last edited by arlu1201; 08-19-2013 at 05:06 AM.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Excel 2007 : Copy Data From Textboxes In A Userform To Clipboard

    RickyNZ,

    Welcome to the forum. 2 pointers -

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.

    Also,

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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