+ Reply to Thread
Results 1 to 3 of 3

Protect sheet but allow insert macro.

  1. #1
    Registered User
    Join Date
    10-16-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    54

    Protect sheet but allow insert macro.

    Hello all,

    And thank you for all the top advice I have received.

    I have a need to protect my worksheets but they are useless unless I am still able to use an insert cells macro I have written. I've tried allowing all of the protect sheet options but it seems if it is protected in any way this macro wont work.

    Has anyone got any ideas about this?

    Here is the code for your reference (essentially it finds a range, copies then inserts it to the top of a table)
    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Protect sheet but allow insert macro.

    you have to unprotect your sheet before doing the insert. It can be something like:
    Please Login or Register  to view this content.
    If your sheet is password protected, it is like this:
    Please Login or Register  to view this content.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    10-16-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Protect sheet but allow insert macro.

    Ah, of course.

    Thank you very much Pierre!

+ 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. Macro to Insert row and protect som cells anywhere in the Worksheet
    By graiggoriz in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-20-2013, 06:13 PM
  2. Edit existing marco to unlock protect sheet, remove set criteria and re protect sheet
    By summer2010 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2013, 09:29 AM
  3. How to protect the user cant insert a sheet
    By karthisucc9 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2012, 11:21 AM
  4. Macro to Unprotect Sheet, Sort then Protect Sheet
    By lisamckinney in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2010, 05:23 PM
  5. [SOLVED] Using macro to un/protect sheet
    By Bonbon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2006, 04:14 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