+ Reply to Thread
Results 1 to 8 of 8

Thread: lock sheets but not buttons

  1. #1
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    lock sheets but not buttons

    i have a problem. When I lock a sheet, all the combo boxes and tick boxes are locked too. I want to lock the sheet but allow function with comboboxes and all the buttons and stuff...

    apreciated

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639

    Re: lock sheets but not buttons

    What kind of controls are you using? What is not working with the controls?
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,523

    Re: lock sheets but not buttons

    This may be helpful.

    Run Macros On Protected Worksheets

  4. #4
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: lock sheets but not buttons

    Quote Originally Posted by royUK View Post
    What kind of controls are you using? What is not working with the controls?
    the combo boxes (the boxes when you click appear more than one thing to choose in a list, you know?)

    when i protect the sheet it doesnt allow me to use that control and also the "tick boxes"

  5. #5
    Registered User
    Join Date
    03-13-2008
    Posts
    45

    Re: lock sheets but not buttons

    While locking the sheet, check "Edit Objects", and then lock your sheet.

  6. #6
    Registered User
    Join Date
    03-31-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: lock sheets but not buttons

    its not working... i lock the sheet and tick edit objects but when i click in a combo box or in a tick box the message that the shhet is locked appears and i cant change nothing

  7. #7
    Registered User
    Join Date
    09-13-2009
    Location
    China
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: lock sheets but not buttons

    mybe you should perfect you macro,using code change the protection status,before running the macro----release the sheet,when then "sub" over locked the sheet again


    Private Sub ComboBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    On Error Resume Next
    Sheets(1).Unprotect Password:="123"
    End Sub

    Private Sub ComboBox1_LostFocus()
    On Error Resume Next
    Sheets(1).Protect Password:="123"
    End Sub
    Last edited by andrewyang; 09-23-2009 at 01:19 AM.

  8. #8
    Registered User
    Join Date
    09-13-2009
    Location
    China
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: lock sheets but not buttons

    Following attachement is example
    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.2.0