+ Reply to Thread
Results 1 to 2 of 2

Can't seem to make an ACTIVEX button coppy content from ACTIVEX textbox to ClipBoard

  1. #1
    Registered User
    Join Date
    11-11-2021
    Location
    US
    MS-Off Ver
    365
    Posts
    4

    Can't seem to make an ACTIVEX button coppy content from ACTIVEX textbox to ClipBoard

    Dear Forum,


    I'm trying to make an ActiveX Button that upon click will copy all content from an ActiveX Textbox to CLIPBOARD.

    I managed to go through some code snippets but I can't get it to run.

    Upon hitting ctrl + v I'm pasting strange symbols like this: ￿￿

    The code I am using is the following:

    Private Sub CommandButton1_Click()


    With New MSForms.DataObject

    'Put a string in the clipboard
    .SetText TextBox1.Text 'Textbox1
    .PutInClipboard

    'Get a string from the clipboard
    .GetFromClipboard
    Debug.Print .GetText

    End With

    End Sub


    Any feedback would be strongly appreciated!

    Kind regards!

  2. #2
    Registered User
    Join Date
    11-11-2021
    Location
    US
    MS-Off Ver
    365
    Posts
    4

    Re: Can't seem to make an ACTIVEX button coppy content from ACTIVEX textbox to ClipBoard

    It turns out that my code was actually correct!

    It all works now.

    Make sure to turn off DESIGN MODE when testing! :D

    Wishing all the best!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. ActiveX Textbox and Command button issue
    By kevinlib in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2021, 02:33 PM
  2. ActiveX Command Button combined with ActiveX List Boxes – VBA Code Needed
    By Stlcards13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2017, 02:56 PM
  3. Multi-Worksheet ActiveX Textbox to ActiveX Textbox Concatenate
    By HVE_Skynet in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2014, 02:11 PM
  4. ActiveX Textbox to ActiveX Textbox Concatentate
    By HVE_Skynet in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2014, 05:22 PM
  5. How to make one ActiveX button select another?
    By mgolou in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2014, 06:29 AM
  6. VBA to make an ActiveX Command Button Refresh 1 Pivot
    By bstiefel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2014, 11:32 PM
  7. make an activex command button highlight
    By c_spooner1999 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-30-2013, 12:57 PM

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