+ Reply to Thread
Results 1 to 9 of 9

Inserted Row NOT to Inherit Lock Property

  1. #1
    Forum Contributor amartinez988's Avatar
    Join Date
    05-04-2015
    Location
    Miami
    MS-Off Ver
    Office 2010
    Posts
    183

    Inserted Row NOT to Inherit Lock Property

    Hey Guys,

    Here's the Deal:

    I have a Protected Worksheet with a locked dynamic Range (for the purpose of understanding let's say: A1:E100). I have allow in the protection properties to insert and delete new rows. So, if I want to insert a row between A10 and A11 it will let me. However, if I want to add content to this row it will not let me because it inherited the properties from the Cells Above.

    If I inserted a new row in cell A250 I won'r have a problem of course, because this part of the sheet is not locked. Obviously I want to insert the Row between the mentioned dynamic define range (A1:E100).

    Is there a way to insert new rows without inheriting the properties from the cell Above?
    Is there a way that the new inserted rows aren't locked?

    I want to keep my locked Range as it is right now and I don't to insert the row if some other Range that is not between my defined Range.

    Thanks a lot for your help in advance.
    1 Or 0, that is the question.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Inserted Row NOT to Inherit Lock Property

    I don't know of a way to insert a row without inheriting from above. You can have code do this; unprotect, insert, unlock the new row, and reprotect.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor amartinez988's Avatar
    Join Date
    05-04-2015
    Location
    Miami
    MS-Off Ver
    Office 2010
    Posts
    183

    Re: Inserted Row NOT to Inherit Lock Property

    Thank you!

    Yes, code will solve the problem but I wanted to solve it using only the properties of the sheet. So that when the user will right-click > insert row it will create a row without inheriting the above cells properties. I don't want to use Events either so I can I will have to insert a Button that does this.

    Thanks for answering

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Inserted Row NOT to Inherit Lock Property

    When you insert a row, Options > Advanced, Cut, copy, and paste: tick Show Paste Options button. Then you'll have the choice of copying formatting from above, below, or clearing formats.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Inserted Row NOT to Inherit Lock Property

    Quote Originally Posted by amartinez988 View Post
    Thank you!

    Yes, code will solve the problem but I wanted to solve it using only the properties of the sheet. So that when the user will right-click > insert row it will create a row without inheriting the above cells properties. I don't want to use Events either so I can I will have to insert a Button that does this.

    Thanks for answering
    You realize this is the Excel Programming / VBA / Macros forum?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Inserted Row NOT to Inherit Lock Property

    I wonder if there is a registry setting that changes the default copyorigin. AF, do you know?

  7. #7
    Forum Contributor amartinez988's Avatar
    Join Date
    05-04-2015
    Location
    Miami
    MS-Off Ver
    Office 2010
    Posts
    183

    Re: Inserted Row NOT to Inherit Lock Property

    shg, I was wondering the same

  8. #8
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Inserted Row NOT to Inherit Lock Property

    Quote Originally Posted by shg View Post
    I wonder if there is a registry setting that changes the default copyorigin. AF, do you know?
    I couldn't find a registry key for that. It doesn't mean that's the final word; only that I didn't find it if it does exist.

    An alternative kludge is if you always insert at say row 11, format row 10 the way you want (unlocked) and hide it.

  9. #9
    Forum Contributor amartinez988's Avatar
    Join Date
    05-04-2015
    Location
    Miami
    MS-Off Ver
    Office 2010
    Posts
    183

    Re: Inserted Row NOT to Inherit Lock Property

    AlphaFrog, that's not a bad solution ...

+ 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] Lock all cells but those just inserted.
    By nanogr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-09-2014, 10:09 PM
  2. Looking for formulas to have cells inherit formatting
    By Wingtips in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-27-2013, 09:27 PM
  3. how to lock an inserted image
    By Suraj3825 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-16-2012, 01:27 PM
  4. Clear Function Resets Cell Lock Property
    By Melon00 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2011, 10:48 PM
  5. [SOLVED] excel template inherit
    By [email protected] in forum Excel General
    Replies: 3
    Last Post: 05-03-2006, 05:10 PM
  6. VSTO: Inherit from OfficeCodeBehind Class
    By Damien Anselmi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-11-2005, 01:05 AM

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