+ Reply to Thread
Results 1 to 7 of 7

Default property of protect sheet tool

  1. #1
    Forum Contributor
    Join Date
    02-01-2013
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    163

    Default property of protect sheet tool

    Hi,

    I would like to know how to set default property of protect sheet tool to check the desired boxes. This because I have written the vba code to unprotect the sheet for some purpose and then protect back but after that there are only 2 boxes that ticked. I want to have another boxes to be ticked too. Anyone please help?

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Default property of protect sheet tool

    Hi, impresxy,

    sorry but I donīt get the point about unprotecting a sheet and boxes (check most possible, text, list, combos?): You can protect the sheet on opening with the parameter UserInterfaceOnly:=True which will allow macro code to work without unprotecting and protecting the sheet (this is a volatile setting and must be repeated on each opening of the workbook).

    Could you possibly attach a workbook for more information?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    02-01-2013
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: Default property of protect sheet tool

    Hi Ciao,

    Sorry for my mess english. The tick box is like when u click the protect sheet button on the menu bar, there are options for you to choose how you will allow user to do after the sheet is protected. here is the picture
    Untitled.jpg

    I wish to have more than that 2 boxes to be ticked by default. Is that possible?

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Default property of protect sheet tool

    if you are reprotecting the sheet in code you can specify all of those options in your code. there is no way to change the defaults
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Forum Contributor
    Join Date
    02-01-2013
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: Default property of protect sheet tool

    would you please let me know how the code is like? I want that 2 boxes and edit object to be allowed? this is the code i made to run the invoice no.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Default property of protect sheet tool

    Please Login or Register  to view this content.
    you can look up the protect method in the vb help to see all the other available parameters

  7. #7
    Forum Contributor
    Join Date
    02-01-2013
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: Default property of protect sheet tool

    Thanks a lot for your help.. I use "...= true " and it works.. Thanks again for guidance..

+ 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