+ Reply to Thread
Results 1 to 2 of 2

Inserting rows in protected sheet

  1. #1
    Registered User
    Join Date
    06-27-2005
    Posts
    7

    Inserting rows in protected sheet

    This problem may sounds funny.
    I have two columns say Col. E and F which are protected and contains formulas.
    When I try to insert a row, its is throwing error. I want to insert a row and also the formulae in the columns in E and F has to be reflected in the inserted row.
    In the meantime the cells in the Col. E and F has to be protected.

    Is there any way for doing this?

    Thanks in advance.

    Rajesh

  2. #2
    Registered User
    Join Date
    06-29-2005
    Location
    England
    Posts
    50
    All worksheets should be protected from the prying fingers of end users, but this causes a problem when you want to programatically make changes.

    What I do is I have two subroutines Lock_Sheet and Unlock_Sheet:

    Please Login or Register  to view this content.
    The actual statement that does the work is

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    However, there are a lot of other things to consider as well such as:
    • Process events
    • Process Calculations
    • Display changes as they happen or not
    • Display alerts that might be triggered or not

    That's why there is a hell of a lot more code surrounding the relevant statements above.

    I tend to use a push down stack to store everything that I need to keep track of such as the current state of the worksheet, messages being displayed to the user etc. In that way I can call these routines as many times as I like as long as the calls happen in pairs.

    An example of how to do this is below:

    Please Login or Register  to view this content.
    Regards

    Rich
    Last edited by Rich_z; 06-29-2005 at 11:30 AM.

+ 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