+ Reply to Thread
Results 1 to 4 of 4

Use a checkbox to hide a row

  1. #1
    Registered User
    Join Date
    12-02-2007
    Posts
    12

    Use a checkbox to hide a row

    Let me start by saying I am new to Excel. With that said, I have a worksheet that I want to use a check box on that when selected, hides the row. I believe I need to assign a macro to the checkbox to do this but I do not know the proper code.

    Also, is it possible to set the format for a row as the default for that worksheet so when a new row is inserted it will have all the same settings? For example, I have a few columns of data, then the column with the check box to hide that row when selected. I want to be able to insert a new row and have it appear with a check box and the proper macro assigned. Is this possible?

    Thanks in advance.

  2. #2
    Forum Contributor
    Join Date
    10-14-2004
    Location
    San Diego, CA
    Posts
    213
    Hello aquatrojan:

    Here’s a simple code to get you started.

    I recommend you re-word your question and post it in the programming section; you’re more likely to get a better response.

    Please Login or Register  to view this content.
    Matt

  3. #3
    Registered User
    Join Date
    12-02-2007
    Posts
    12

    Hide a row by clicking a check box

    I actually have 2 questions that I hope somebody can help me with.

    1. I have a worksheet that I use to keep track of equipment repairs. I am trying to add a checkbox that when clicked will hide the row it corresponds to. The following code was suggested to me:

    Please Login or Register  to view this content.
    I am new to excel and macros so I don't fully understand this. What is the porupose of "10:20" ? I copied and pasted it into the VBA editor but when I click the checkbox it says: "Cannot run the macro Book1!CheckBox1_Click. The may not be available in this workbook or all macros may be disabled".

    2. Is it possible to set a default arrangement for rows within a workbook? I would like to be able to insert a row and have it automatically have a checkbox associated with it with the necessary macro, etc.

    Thank you in advance.
    Last edited by VBA Noob; 12-04-2007 at 06:13 PM.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    A generic solution will need to be able to identify which checkbox was clicked.

    The following link has a signficant discussion on this.

    http://www.vbaexpress.com/forum/showthread.php?t=16026
    Martin

+ 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