+ Reply to Thread
Results 1 to 6 of 6

Hide sheet rows when ticking checkbox - debug error

  1. #1
    Registered User
    Join Date
    08-22-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Hide sheet rows when ticking checkbox - debug error

    I have inserted some code as below on a sheet in my workbook called "Implementation". When the checkbox is ticked it hides/unhides rows. It does this but also unfortunately it throws up a debug error which I can't seem to get rid of. Very frustrating! I had it working fine before when it was called "Sheet1" and I'm not a programmer so dunno what i'm doing really! I tried using "ActiveSheet" instead of Sheets("Implementation") too but the resulting error was the same. Help!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Hide sheet rows when ticking checkbox - debug error

    try with
    Public Sub CheckBox18_Click()
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    08-22-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Hide sheet rows when ticking checkbox - debug error

    I've got rid of this error by using a workaround which means I don't have to address it now, however I have another problem... when I remove the ticks in all the checkboxes (which then hides rows), save and close the spreadsheet...... on reopening it I find that all the checkboxes have been resized (squashed or stretched) and in some cases disappeared entirely! I am sure they are there but they've probably been resized to zero width or something. Help?

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Hide sheet rows when ticking checkbox - debug error

    attach a sample file

  5. #5
    Registered User
    Join Date
    08-22-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Hide sheet rows when ticking checkbox - debug error

    I cant very easily do that without compromising my company confidentiality.

    I thought of a workaround which would be to save it with all boxes checked and then run a macro on opening that just clears them all down. Not sure if this will work and not sure how to do it. Any suggestions?

  6. #6
    Registered User
    Join Date
    08-22-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Hide sheet rows when ticking checkbox - debug error

    ok so here is the sheet I am working ok. As you can see, when you click on the section headings it expands showing other tickboxes... they are fine if I save the sheet with all main sections ticked but if I save the file with them unticked (and therefore the sections collapsed) when I click the section headings to expand, the tickboxes are all messed up.
    Attached Files Attached Files

+ 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