+ Reply to Thread
Results 1 to 8 of 8

Checkbox to Link Cells to another Worksheet

  1. #1
    Registered User
    Join Date
    07-25-2008
    Location
    Orlando, Fl
    Posts
    7

    Checkbox to Link Cells to another Worksheet

    A little background info... I have a series of projects going on and at the same time, several changes are being made. Some changes apply to every project while some changes only apply to a few. We send them out to the field in the form of addenda. We have a master log which tracks the changes. We also have "Project Specific" Logs which list the changes specific to each project. However currently, that involves creating a new spread sheet and manually copying and pasting rows and weeding out the information that is not needed.

    Right now, the master log indicates which changes affect each project by a simple matrix. This information is not linked to another sheet. I would like to add checkboxes that, when checked, would copy the information in that row, to another worksheet. See the attached example..

    I'd appreciate any help!!

    Thanks,
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Checkbox to Link Cells to another Worksheet

    Hello there,

    Would you like to do this with a macro or with a formula?

    Thanks!

  3. #3
    Registered User
    Join Date
    07-25-2008
    Location
    Orlando, Fl
    Posts
    7

    Re: Checkbox to Link Cells to another Worksheet

    Hi! I'm open to recommendations... I've never used macros before but I'm not averse to learning. Which do you think would be easiest? I'm not sure if this matters in the decision making, but we will be continuing to add to the project list. Right now, there are 6 projects. Within a year it will probably be 20 or more...

    Thank you!

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Checkbox to Link Cells to another Worksheet

    Hello there,

    Attached is your original sample workbook update to include a code that runs whenever a change is made to any columns but A thorugh D.

    To watch the code work, select cell E5 and reenter the X in the cell. Then navigate to the the Project 1 worksheet to view the added information.

    To insert this code into you workbook,

    1. Select the worksheet Master Log
    2. Right click on the worksheet's tab and select the View Code option
    3. In space provided copy and paste the below code:

    Please Login or Register  to view this content.
    4. Anything that appears in green is a comment meant to help you understand what I did.
    5. Close out of Visual Basic and it should work in your workbook.

    Let me know what you think or if you have any questions!

    Thanks
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-25-2008
    Location
    Orlando, Fl
    Posts
    7

    Re: Checkbox to Link Cells to another Worksheet

    Wow! Thank you!! The green help notes are a nice touch... I had to change a few options regarding which row to reference and which columns to copy over, but (initially) it worked perfectly... However there are a few kinks...

    1. When I save, close, and reopen, the code doesn't work. I've tried saving it as macro enabled worksheet, setting my security level to Enable ALL macros, and selected the Trust access to the VBA project object model option. When I add an 'X' to one of the cells, VBA pops up with the following error: "Compile error : Expected End Sub"

    2. I accidentally placed an 'X' in one of the cells and the information got copied over to the project worksheet. However when I deleted the X, the information still remained in the worksheet. Is there a way for the code to automatically delete the information when an x is deleted from the master log?

    I really appreciate your help!

    ---------- Post added at 09:52 AM ---------- Previous post was at 09:45 AM ----------

    Scratch number 1... When I first copied your code, I missed the last two commands. Adding them, fixed that problem

  6. #6
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Checkbox to Link Cells to another Worksheet

    Hmm that's weird the below lines in the code should account for that

    Please Login or Register  to view this content.
    Did you do the accidental X before or after you corrected the code?

  7. #7
    Registered User
    Join Date
    07-25-2008
    Location
    Orlando, Fl
    Posts
    7

    Re: Checkbox to Link Cells to another Worksheet

    OK, got it... On my master log, the project names are listed along row 1 (instead of 2). I simply had to change:
    With Sheets (Cells(2, Target.Column) .Value)
    to
    With Sheets (Cells(1, Target.Column) .Value)
    and everything works.

    Thanks again for your help!

  8. #8
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Checkbox to Link Cells to another Worksheet

    Awesome, glad you could get that figured out!

    Don't forget to mark this thread solved and maybe give a little star tap if I helped!

    Thanks!

+ 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