+ Reply to Thread
Results 1 to 3 of 3

VBA - Copy cell content to clipboard on double-click & remove quotes

  1. #1
    Forum Contributor
    Join Date
    08-25-2015
    Location
    London
    MS-Off Ver
    MS 365
    Posts
    213

    Question VBA - Copy cell content to clipboard on double-click & remove quotes

    Hi all,

    I've tried several macros now to copy cell content, in a specified range and on double-click, to the clipboard.

    I found a single-click version that seems to work:

    Please Login or Register  to view this content.
    ...however, it includes " at the beginning and end of the copied string (at least when I paste outside of Excel), which I assume is happening because my copied content has multiple lines of text.
    That is getting a bit annoying now as I'm posting into a JIRA ticket and the " are messing up the formatting.

    I then also found this, which is using the Microsoft Forms 2.0 library (added) and supposed to be a double-click variant of the above (which would be my preference), but doesn't seem to be working at all:

    Please Login or Register  to view this content.
    Does anyone have an idea how I could tweak the 2nd code (double-click variant) to work + implement some sort of code that prevents it from including the quotes " to the copied text in the clipboard?

    No luck finding anything on here or other forums, but looks like that has been asked a few times already

    Any help is appreciated!
    Many thanks!

  2. #2
    Forum Contributor
    Join Date
    08-25-2015
    Location
    London
    MS-Off Ver
    MS 365
    Posts
    213

    Re: VBA - Copy cell content to clipboard on double-click & remove quotes

    Hi all,

    After some crazy trial and error, I think I found a solution to my problem. The above code for copying a cell on double-click works, however, my Microsoft Forms 2.0 library was corrupted. I basically saved the file as an .xls and then again as a .xlsm & readded my code, which seems to have reset the libraries. All is working now, which is great (plus it also copies without the question marks)!

    Now I'm trying to optimize this code slightly. Basically, I want to double click any cell in range W37:W1000, but copy the cell content 2 columns to the right of that cell (so in column Y). Assume I need to add some kind of offset to the below? Just don't know where and how to start really...

    Hope someone can help?
    Thank you!!

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-25-2015
    Location
    London
    MS-Off Ver
    MS 365
    Posts
    213

    Re: VBA - Copy cell content to clipboard on double-click & remove quotes

    Hi all,

    After trying a few things out, I think I got it to work so posting my solution here if anyone else needs it:

    Please Login or Register  to view this content.
    Thanks!

+ 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. [SOLVED] VBA copy on click and paste without double quotes (beginning and end)
    By kingofcamden in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-11-2019, 09:05 AM
  2. ADD/DELETE Cell content on double click
    By belen373 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-30-2014, 07:11 PM
  3. Replies: 0
    Last Post: 09-24-2012, 01:20 PM
  4. List box Double Click Copy and remove item
    By thameem127 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2012, 05:00 PM
  5. How to copy the value of cell into clipboard by double click
    By lassang01 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-24-2007, 05:01 PM
  6. [SOLVED] how to copy on double-click the cell value to Clipboard
    By cyrille in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-15-2005, 06:45 PM
  7. [SOLVED] how to copy on double-click the cell value to Clipboard
    By cyrille in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 02-11-2005, 08:06 PM

Tags for this Thread

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