+ Reply to Thread
Results 1 to 3 of 3

Copy a Cell to Clipboard Using Checkbox

  1. #1
    Registered User
    Join Date
    10-21-2010
    Location
    Portugal
    MS-Off Ver
    Office 365 & Google Sheets
    Posts
    23

    Copy a Cell to Clipboard Using Checkbox

    Hi,

    Currently I have this VBA code working perfectly:

    Sub clearcheck()
    Dim sh As Worksheet
    For Each sh In Sheets
    On Error Resume Next
    sh.CheckBoxes.Value = False
    On Error GoTo 0
    Next sh
    Range("E2, F2").ClearContents
    End Sub

    I also have 3 checkboxes (form control) linked to 3 corresponding cells and I’m just using with some conditional format function to highlight 3 other cells “=IF($B10=TRUE;TRUE;FALSE)”.

    Everything is working just fine, but now I would like to add one more function. What I need is that every time I tick a checkbox I need to automatically copy the content of another cell.

    Example:

    IF Cell B6 true, copy F6 content to clipboard.
    IF Cell B8 true, copy F8 content to clipboard.
    IF Cell B10 true, copy F10 content to clipboard.

    Can anyone please help me.. 

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Copy a Cell to Clipboard Using Checkbox

    You're better off doing the copy within the Checkbox_Click event, the following will copy F6 whenever the checkbox1 is ticked.

    Please Login or Register  to view this content.
    Dont forget however that clicking Box 1 and then Box2 will result in the clipboard holding Box2 value only.
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    10-21-2010
    Location
    Portugal
    MS-Off Ver
    Office 365 & Google Sheets
    Posts
    23

    Re: Copy a Cell to Clipboard Using Checkbox

    Good morning to all,

    pjwhitfield, first of all thank you for your quick reply.

    I didn't figure it out why, but nothing happen using with your code.

    However, right now its working using this code:
    Please Login or Register  to view this content.
    The only thing I need now and I can't get it to work yet is to clear the clipboard every time I untick a box.

    If I use:
    Please Login or Register  to view this content.
    The code stop working in CheckBox1 and CheckBox2
    Last edited by nupema; 01-20-2015 at 04:52 AM.

+ 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. Copy cell value to clipboard
    By adj7388 in forum Excel General
    Replies: 8
    Last Post: 03-25-2019, 11:45 AM
  2. [SOLVED] Copy text to clipboard based on CheckBox value on Command Button click
    By askpcguy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2014, 01:21 AM
  3. Find Cell Value and Copy to ClipBoard
    By Panelmaker in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-19-2013, 11:31 AM
  4. Copy one cell to an other but colors do not copy. While not using clipboard to copy.
    By chuckchuckit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2010, 03:08 AM
  5. Copy content of cell to clipboard
    By amitmodi_mrt in forum Excel General
    Replies: 3
    Last Post: 09-08-2009, 11:26 AM

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