+ Reply to Thread
Results 1 to 5 of 5

How to protect against user interference...

  1. #1
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    How to protect against user interference...

    I need to protect a sheet from being changed or deleted by users, but almost ever cell in the workbook is used in a macro of some sort, and when i protect the sheet, it seems to stop all of that from working...
    Any helps or tips?
    Also, is there a way to set up a code so that, if at any point in the process something fails or bugs, it aborts the whole thing without changing anything?

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: How to protect against user interference...

    Just create a routine to unprotect the sheet and call it at the start of each macro, then re-protect afterwards

    Also, is there a way to set up a code so that, if at any point in the process something fails or bugs, it aborts the whole thing without changing anything?
    That depends what you mean, if you mean like an undo, then there's nothing automated. The better solution is to check everything before running code to reduce the likelihood of error and then use error handling.

  3. #3
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: How to protect against user interference...

    1. How would i creat the routine to unprotect and reprotect?
    2. Problem is that most of the user using the sheet dont know a spec about VBA...

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: How to protect against user interference...

    To Unprotect:
    Please Login or Register  to view this content.
    To protect:
    Please Login or Register  to view this content.
    They don't need to know VBA, you put it in

  5. #5
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: How to protect against user interference...

    Thanks for the code...
    2. they dont need to know VBA i realise, but if something bugs, and it pops up halfway through what they are trying to accomplish, they have no idea what to do...
    and there are some silly little things that mess up, such as a data validation a A21:A45, where if you press enter twice in a row, it bugs out, and i can find out why... silly things like that, but i am not smart enough to figure them out... how do i best use error handling?

+ 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