Results 1 to 7 of 7

Checkbox doesn't work in protected mode

Threaded View

djkeyclub Checkbox doesn't work in... 08-15-2013, 05:17 PM
Solus Rankin Re: Checkbox doesn't work in... 08-15-2013, 05:31 PM
djkeyclub Re: Checkbox doesn't work in... 08-15-2013, 05:35 PM
djkeyclub Re: Checkbox doesn't work in... 08-15-2013, 05:36 PM
Solus Rankin Re: Checkbox doesn't work in... 08-15-2013, 05:37 PM
djkeyclub Re: Checkbox doesn't work in... 08-15-2013, 05:38 PM
djkeyclub Re: Checkbox doesn't work in... 08-15-2013, 06:30 PM
  1. #1
    Registered User
    Join Date
    08-14-2013
    Location
    Lynn Haven, FL
    MS-Off Ver
    Excel 2010
    Posts
    4

    Checkbox doesn't work in protected mode

    I have an excel sheet in which the majority of it is protected and cells are left open to be filled in by my employees while they cannot manipulate all of them. This is my first time venturing into Macros/VBA, etc. so any help will be appreciated.

    I created a checkbox that when clicked, hides multiple rows as well as successfully hides other checkboxes. The code is probably longer than it needs to be and is very simple but I don't know another way to do it at this point. Basically, I want to protect my sheet and the checkbox still work. Can anyone help?

    Also, I have the sheet actually named "Employee Information" and I don't know how else to do it except to say "activesheet" though my guess is that my protecting the sheet it no longer recognizes it as an active sheet.

    Please help, on a time crunch! I am using Excel2010. Also worth mentioning - when I emailed this to my boss (saved as macro-enabled worksheet), he opened it, enabled the macros and it did not work for him (sheet was unprotected at the time). Any ideas?


    Private Sub CheckBox3_Click()
    
    
    
    If ActiveSheet.Rows("15:24").Hidden = False Then
    
    ActiveSheet.Rows("15:24").Hidden = True
    Else
    ActiveSheet.Rows("15:24").Hidden = False
    End If
    
    
    
    If ActiveSheet.Rows("32:32").Hidden = False Then
    ActiveSheet.Rows("32:32").Hidden = True
    Else
    ActiveSheet.Rows("32:32").Hidden = False
    End If
    
    
    
     If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox5.Visible = True
     Else
     ActiveSheet.CheckBox5.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox4.Visible = True
     Else
     ActiveSheet.CheckBox4.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox6.Visible = True
     Else
     ActiveSheet.CheckBox6.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox1.Visible = True
     Else
     ActiveSheet.CheckBox1.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox7.Visible = True
     Else
     ActiveSheet.CheckBox7.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox8.Visible = True
     Else
     ActiveSheet.CheckBox8.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox9.Visible = True
     Else
     ActiveSheet.CheckBox9.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox10.Visible = True
     Else
     ActiveSheet.CheckBox10.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox11.Visible = True
     Else
     ActiveSheet.CheckBox11.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox12.Visible = True
     Else
     ActiveSheet.CheckBox12.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox13.Visible = True
     Else
     ActiveSheet.CheckBox13.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox14.Visible = True
     Else
     ActiveSheet.CheckBox14.Visible = False
     End If
     
      If ActiveSheet.CheckBox3 = True Then
     ActiveSheet.CheckBox15.Visible = True
     Else
     ActiveSheet.CheckBox15.Visible = False
     End If
    
    
    
    End Sub
    Last edited by djkeyclub; 08-15-2013 at 05:36 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA Doesn't Work With Protected Spreadsheet
    By jaylam in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-29-2013, 07:05 PM
  2. Excel VBA Formatting doesn't work on protected sheets?
    By meissen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2013, 12:09 PM
  3. An email link doesn't work when the worksheet is protected. How to overcome?
    By TomFioritto in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-31-2013, 07:28 PM
  4. Replies: 0
    Last Post: 09-18-2012, 11:24 AM
  5. [SOLVED] Macro doesn't work on UserInterfaceOnly-protected sheet
    By Kasama in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-08-2006, 05:25 AM

Tags for this Thread

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