+ Reply to Thread
Results 1 to 9 of 9

Working w/Checkboxes - Getting the name of the field where the value of checkbox is true

  1. #1
    Registered User
    Join Date
    08-08-2012
    Location
    Kenosha, WI
    MS-Off Ver
    Excel 2010
    Posts
    6

    Working w/Checkboxes - Getting the name of the field where the value of checkbox is true

    Hi everyone, I'm new to this forum and have been very impressed with all the information available ... have already learnt a lot. So thought to register as I really need some help. I have never worked with checkboxes and have not been able to find the info I need. I have a worksheet with many different categories. Each category has seven checkboxes to indicate options, if any. How do I display what option(s) has been checked in each category. I have already spent a couple of days trying to find this info and am behind schedule. Any and all help will be greatly appreciated!
    Thank you all,
    Mandy
    Last edited by mkp; 08-09-2012 at 03:40 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Working w/Checkboxes - Getting the name of the field where the value of checkbox is tr

    To Attach a File (less than 1 MB size):

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

    * Give a more detailed explanation of what you are trying to do.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    08-08-2012
    Location
    Kenosha, WI
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Working w/Checkboxes - Getting the name of the field where the value of checkbox is tr

    Sample.xls

    For each category, need to know which checkboxes are checked ... for example, under Navigating, boxes checked could be workflow, equipment and security. These should be listed follows:
    Navigating:
    Home YES 100% Workflow
    Equipment
    Security
    (four columns ... all checkbox labels in one column - Col4 in this case)
    Schedule N/A 0% Pools
    etc... etc...

    Your help will be greatly appreciated!
    Thank you!!!
    Last edited by mkp; 08-10-2012 at 02:58 PM.

  4. #4
    Registered User
    Join Date
    08-08-2012
    Location
    Kenosha, WI
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Working w/Checkboxes - Getting the name of the field where the value of checkbox is tr

    I added a Result tab to better explain what I would like the result to be ... hope this explains it better. Thx again!
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Working w/Checkboxes - Getting the name of the field where the value of checkbox is tr


    1. Your original workbook revenue sheet has about 1250 checkboxes stacked in layers on top of each other.
    2. In order to use any checkboxes, you would have to assign each a linked cell on the sheet (yuk!)
    3. My alternative: I have deleted all of the checkboxes. I am using the worksheet doubleclick event to place check mark directly into the cell. Note that the cell is formatted for Marlett font which displays an "a" as a checkmark.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    If the cell is empty put a ckmk, if not empty clear it.
    Attached Files Attached Files
    Last edited by protonLeah; 08-12-2012 at 02:00 AM.

  6. #6
    Registered User
    Join Date
    08-08-2012
    Location
    Kenosha, WI
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Working w/Checkboxes - Getting the name of the field where the value of checkbox is tr

    Thank you for your response! I had come across the check mark option during one of my online searches but could not figure out how to work with it. The form is much bigger than what I showed in my sample. I cannot figure out how to use the private sub Worksheet_BeforeDoubleClick to create the rest of the form. What is the RC Score Sheet? I appreciate all the work you have done, but since I have not worked with arrays, it is hard for me to follow along with your code
    Also, with the form being much larger, it would require many more named ranges for the macro.
    Last edited by mkp; 08-13-2012 at 04:39 PM.

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Working w/Checkboxes - Getting the name of the field where the value of checkbox is tr

    1. "...I cannot figure out how to use the private sub Worksheet_BeforeDoubleClick to create the rest of the form..."
    R: The DoubleClick Event does not "create" any forms. It is used to put a check mark in the cell in which you do a double click. Notice on the sheet that the lop left cell for checkmarks is I2 and that the lower right cell is Q20. So, if you double click a cell in the block defined by those two corners it will insert a checkmark. Therefore, if you add more activities, the line
    Please Login or Register  to view this content.
    must be modified with Q20 replaced by the new last cell's address.

    2. "...What is the RC Score Sheet? ..."
    R: That sheet is included in the workbook you posted (it was hidden, I un-hid several sheets to see what was going on in the workbook. Evidently this isn't your workbook.


    3. Unfortunately, because of the layout of the sheet, with different numbers of categories under the various activities, I don't see an alternative to NAMED ranges. Once you create those NAMED ranges, you will have to modify the line:
    Please Login or Register  to view this content.
    to include the new names; each enclosed in quotes and separated by commas.
    Last edited by protonLeah; 08-13-2012 at 08:43 PM.

  8. #8
    Registered User
    Join Date
    08-08-2012
    Location
    Kenosha, WI
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Working w/Checkboxes - Getting the name of the field where the value of checkbox is tr

    I inherited this workbook (third person to get it...) and the creator no longer available to ask questions. Thank you very much for all your help. Will work with it and get back to you on how it's going
    Thx again!

  9. #9
    Registered User
    Join Date
    08-08-2012
    Location
    Kenosha, WI
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Working w/Checkboxes - Getting the name of the field where the value of checkbox is tr

    Hello, I would like to understand how the DoubleClick Sub works ...
    *I get what you mean by "double click a cell in the block defined by those two corners it will insert a checkmark" ... how are the cells created/formated? I copied that Sub into my file and used the same cell range, but cannot get it to work. When I double click on it, it just puts an "a" in it ...!
    *Also, can a number of different ranges be used? For example, if cells needing the checkmark are I2-M2, I5-M5, I9-M9, etc...
    *Lastly, I would like a command that would empty all checkmarks, once recorded, and be ready for next entry.
    I really appreciate your help, but instead of just copying it, would like to know how to do it! Thank you!
    Last edited by mkp; 08-22-2012 at 03:56 PM.

+ 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