+ Reply to Thread
Results 1 to 2 of 2

Running Macro and Worksheet Change on PROTECTED Sheet?

  1. #1
    Registered User
    Join Date
    11-23-2013
    Location
    new york, ny
    MS-Off Ver
    Excel 2010
    Posts
    42

    Running Macro and Worksheet Change on PROTECTED Sheet?

    Hello!

    I'd like all three macros to work below on a protected sheet... Is that possible? I get an error each time I try to run it while protected. How can I work around that?

    add row with new employee
    Please Login or Register  to view this content.

    Delete row of selected employee
    Please Login or Register  to view this content.


    Sort when there is a change:
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2014
    Location
    England
    MS-Off Ver
    Excel 2003 - 2016
    Posts
    575

    Re: Running Macro and Worksheet Change on PROTECTED Sheet?

    You need to protect the sheet(s) with the switch: userinterfaceonly = true.

    This tells Excel to allow VBA to make changes, only disallowing the user to via the UI (user interface). However, you need to set this switch every time the workbook is opened as Excel will forget you've done this. In the workbook_open event put some code to unprotect all your worksheets and then protect again with the userinterfaceonly = true switch.

+ 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. running a macro on protected worksheet
    By gryffin13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2015, 09:24 AM
  2. Running Macro in Password protected sheet in excel 2007
    By alla_ratnaji in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-28-2012, 03:30 AM
  3. Excel 2007 : Running a Macro on a Password Protected Sheet
    By Martin Chamberlin in forum Excel General
    Replies: 1
    Last Post: 05-05-2011, 09:27 AM
  4. Running Macro on protected worksheet
    By pdmkh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2011, 10:32 AM
  5. running a macro on a protected worksheet
    By smithy_o7 in forum Excel Programming / VBA / Macros
    Replies: 38
    Last Post: 06-21-2010, 06:45 AM
  6. running Macro on a Protected Worksheet
    By Martha in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2008, 02:29 PM
  7. Error- Running a Macro on a Protected Sheet
    By nacho in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2007, 08:21 PM

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