Results 1 to 8 of 8

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

Threaded View

BiggTimm Copy Data From Textboxes In A... 08-18-2010, 12:42 AM
BiggTimm Re: Copy Data From Textboxes... 08-19-2010, 07:39 AM
Andy Pope Re: Copy Data From Textboxes... 08-19-2010, 07:48 AM
BiggTimm Re: Copy Data From Textboxes... 08-19-2010, 10:44 AM
Andy Pope Re: Copy Data From Textboxes... 08-19-2010, 10:51 AM
BiggTimm Re: Copy Data From Textboxes... 08-19-2010, 11:08 AM
RickyNZ Re: Excel 2007 : Copy Data... 08-19-2013, 03:41 AM
arlu1201 Re: Excel 2007 : Copy Data... 08-19-2013, 05:07 AM
  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
      
        Dim DataObj As New MSForms.DataObject
        Dim S1 As String
        Dim S2 As String
        S1 = "text string one"
        S2 = "text string two"
        With DataObj
            .SetText S1, "FormatId1"
            .PutInClipboard
            .SetText S2, "FormatId2"
            .PutInClipboard
            S1 = vbNullString
            S2 = vbNullString
            .GetFromClipboard
            S1 = .GetText("FormatId1")
            S2 = .GetText("FormatId2")
        End With
        Debug.Print S1
        Debug.Print S2
    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.

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