+ Reply to Thread
Results 1 to 16 of 16

Excel 2007 : Checkbox in cell -not Form Control

  1. #1
    Registered User
    Join Date
    09-24-2010
    Location
    Baxter, MN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Checkbox in cell -not Form Control

    The problem I am encountering is when I use the Form Controls to insert a checkbox it is free flowing and not locked into place. So when I use my macro to hide some of the rows I do not need to look at those checkboxes do not hide and instead stay visible in the wrong location.

    I was trying to do some research on how to make an actual cell turn into a checkbox (for example when you click on the cell a checkmark shows up and if you click on it again the checkmark goes away) and I do not understand the Visual Basic codes.

    Anyone out there who can answer this in "Excel for Dummy's" terminology?
    Last edited by bowtiepride; 09-27-2010 at 01:19 PM. Reason: Solved

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Checkbox in cell -not Form Control

    Right click on the Check Box and then select "Form Control..."
    Click on the Properties tab of the Form Control dialog box.

    Try the other option combinations to see if one fits your needs.

  3. #3
    Registered User
    Join Date
    09-24-2010
    Location
    Baxter, MN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Checkbox in cell -not Form Control

    Thanks but this did not work. Still stays visible when I hide the row

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Checkbox in cell -not Form Control

    I"ve played with checkboxes in cells and have failed in the past. I now just put an X or blank in the cell. I've found it is a lot less overhead and a lot easier to work with.

  5. #5
    Registered User
    Join Date
    09-24-2010
    Location
    Baxter, MN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Checkbox in cell -not Form Control

    Yes I know that is what we are doing now, however it will be less time consuming for those who use the spreadsheet to be able to just click on the box rather than click, then type. In a world going electronic we re trying to make it as easy as possible.

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

    Re: Checkbox in cell -not Form Control

    Are you willing to use a small macro?
    Ben Van Johnson

  7. #7
    Registered User
    Join Date
    09-24-2010
    Location
    Baxter, MN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Checkbox in cell -not Form Control

    Yes - as long as it is easy. I have a macro in to hide rows I do not need but it was a very simple one that I was able to record just hiding those rows. I use excel everyday, but I am not a programmer so I need 'beginner' language.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Checkbox in cell -not Form Control

    I'm with you on the whole concept. I created a double click in column 1 (Column A) that would put an X in or remove it.

    Put this code behind the sheet (not the module) and change the column to the one you want to X.

    Please Login or Register  to view this content.
    The above code (behind the sheet, not module) will only work if you double click in Column 1. Change the <>1 to the column you want. When you double click in that column an "x" will be input. If an "x" is there it will go to a nothing.

    This is how I resolved my problem that I think is similar to yours.

  9. #9
    Registered User
    Join Date
    09-24-2010
    Location
    Baxter, MN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Checkbox in cell -not Form Control

    Thank You Marvin - what if I have multiple columns? There are different checkboxes in columns A-AA or 1-27? how can I change it for that?

  10. #10
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Checkbox in cell -not Form Control

    I just had this brilliant idea but need to test it. The idea is like this...

    Ctrl-Click on everywhere you might want an X on your worksheet. While they are all selected, name the selected cells with a named range.

    Change the code above so it will only make an X if the range in in the named range.

    Now off to see if that really works.. (before I get too excited about it being brilliant)

  11. #11
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Checkbox in cell -not Form Control

    Ok bowtiepride,

    Proof by example. Find attached a workbook that has some yellow boxes. I selected (using ctrl click) all these boxes and gave them a named range of "YellowBoxes". See the code behind the worksheet as:
    Please Login or Register  to view this content.
    If you double click any of the yellow boxes it will toggle an X on or off. If you double click anywhere else nothing happens.

    Was this what you were looking for?

    I need shg or teylyn to teach me how to use Intersect so my code would be better, but it works.
    Attached Files Attached Files
    Last edited by MarvinP; 09-24-2010 at 07:19 PM.

  12. #12
    Registered User
    Join Date
    09-24-2010
    Location
    Baxter, MN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Checkbox in cell -not Form Control

    Thank you so much. I'm going to try it now

  13. #13
    Registered User
    Join Date
    09-24-2010
    Location
    Baxter, MN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Checkbox in cell -not Form Control

    Well it is working for some of the cells. I think I may need to take a break from it and come back, it's starting to drive me nuts. I checked my name range and all cells I want included are in there, but this formula is only working for the cells on the top part of my spreadsheet and the ones towards the bottom are not working...Thank you so much for figuring this out for me. I guess I needed more help than I originally thought. I guess I'll try to muttle through it.

  14. #14
    Registered User
    Join Date
    09-24-2010
    Location
    Baxter, MN
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Checkbox in cell -not Form Control

    Ok - figured it out-name range only applies to 40 cells, had to add additional ranges for more cells.
    Thanks again.

  15. #15
    Registered User
    Join Date
    03-28-2013
    Location
    florida
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Checkbox in cell -not Form Control

    Ok, trying to setup a call monitoring form for a call center and I tried using the example above but won't let me name more than one cell the same name, keeps giving me an error message. I have 25 monitoring topics to either click yes, no or N/O (not observed). I'm at a loss.

    By the way, this is a great forum!

  16. #16
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Excel 2007 : Checkbox in cell -not Form Control

    oldfart48,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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