+ Reply to Thread
Results 1 to 5 of 5

Protect Cells While Letting Macros Edit Them

  1. #1
    Registered User
    Join Date
    11-03-2017
    Location
    St. John's Newfoundland
    MS-Off Ver
    2010
    Posts
    19

    Protect Cells While Letting Macros Edit Them

    Hello there, I want to protect cells to prevent a user from editing them, however I want to allow macros to be able to change the cell contents if needed (while the sheet is still protected). Is there any way I can do this? Basically, I have a macro that adds 1 to the number value in a cell when activated and I want that to be able to work while the cells are protected from user edits. If anyone would be able to assist with this it would be greatly appreciated.

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Protect Cells While Letting Macros Edit Them

    You can unprotect the sheet in the macro, edit the cell and then protect the sheet.

  3. #3
    Registered User
    Join Date
    11-03-2017
    Location
    St. John's Newfoundland
    MS-Off Ver
    2010
    Posts
    19

    Re: Protect Cells While Letting Macros Edit Them

    Thanks for the quick reply, I never thought about that. Do you know what code I would have to use in order to do it?

  4. #4
    Registered User
    Join Date
    11-03-2017
    Location
    St. John's Newfoundland
    MS-Off Ver
    2010
    Posts
    19

    Re: Protect Cells While Letting Macros Edit Them

    Nevermind, I found out how to do it after. Thanks for your suggestion.

  5. #5
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Protect Cells While Letting Macros Edit Them

    If that takes care of your question, please mark this thread as Solved by selecting Thread Tools --> Mark thread as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Windows Update Not Letting Me Click Buttons For Macros
    By NatalieEC in forum Excel General
    Replies: 2
    Last Post: 12-11-2014, 11:39 AM
  2. Macros on how to copy, paste, edit and remove empty cells
    By razor_raef in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-20-2014, 01:30 AM
  3. New to macros - script to protect cells if a particular cell is populated
    By gsandifer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2013, 04:19 PM
  4. Letting act cells like checkboxes
    By Johan1984 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-02-2012, 02:14 PM
  5. hiding sheets but still letting macros run when printing hidden sheets
    By stevesunfold in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 11-13-2008, 04:35 AM
  6. Protect Cells But Allow Macros?
    By natepen in forum Excel General
    Replies: 1
    Last Post: 03-10-2007, 01:02 AM
  7. [SOLVED] To Protect Excel documents and allowing only few cells to edit
    By DHANRAJ in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-29-2006, 10:20 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