+ Reply to Thread
Results 1 to 5 of 5

Show/Hide Range of Cells Using Multiple Checkboxes

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Show/Hide Range of Cells Using Multiple Checkboxes

    Hi!

    I have a sheet with 7 different check boxes. Each check box refers to a different range of cells. I need to create a sheet where if one box is checked, everything else is hidden. However the user needs to be able to check multiple boxes and have each range of assigned cells showing.

    Example:

    Checkbox 1 = only rows 30 - 69. Checkbox 2 = only rows 70 - 98. Checkbox 3 = only rows 99 - 130. I need to make it so if you click on checkbox 1, you'll only see rows 30 - 69. However if you click on Checkbox 1 and Checkbox 2, you'll see rows 30 - 70. If you click Checkbox 1 and Checkbox 3, then you can see rows 30 - 69 and rows 99 -130, but rows 70 - 98 remain hidden.

    Any assistance would be greatly appreciated.

    Thanks!

  2. #2
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Show/Hide Range of Cells Using Multiple Checkboxes

    Code in this way for all checkboxes with respect to their related rows:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-25-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Show/Hide Range of Cells Using Multiple Checkboxes

    Hi hafizimran,

    Perhaps I'm missing something obvious, but I keep getting a 424 error "object required". When I run debug, it highlights this part of your code:

    Please Login or Register  to view this content.
    I've tried renaming CheckBox1 as the title I gave my checkbox, but no dice. Any thoughts?

    Thanks!

  4. #4
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Show/Hide Range of Cells Using Multiple Checkboxes

    Where are you inserting your code? it should be in the same sheet's module under CheckBox_Click Event handler. Checkboxes should be from ActiveX controls category.
    Last edited by hafizimran; 03-21-2013 at 01:05 PM.

  5. #5
    Registered User
    Join Date
    01-25-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Show/Hide Range of Cells Using Multiple Checkboxes

    That might be the problem. I've been using form controls, not active X and creating modules in the 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