Closed Thread
Results 1 to 2 of 2

Lock cells in worksheet after they are changed

  1. #1
    Registered User
    Join Date
    10-03-2011
    Location
    Miami/Fort Lauderdale, Fl., USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Lock cells in worksheet after they are changed

    I have an audit trail macro has a pop-up only when saving the workbook. What I have been trying to do is to add a lock cells to the macro for any new data. Any cells that require data entry are already unlocked and there are cells with formulas that are unlocked. I do not want to lock these unless something new is entered. What I am thinking is to use the information in columns A and B of the "Audit Trail" worksheet, which list the cell address and the worksheet, respectively, of all cells in which the data has been changed. These are cells that I need locked. There are three codes for the pop-up when saving, a worksheet code, a and a workbook code. The worksheet code is as follows:
    Please Login or Register  to view this content.
    The userform1 code is:
    Please Login or Register  to view this content.
    and the workbook code:
    Please Login or Register  to view this content.
    All of this works, but I want to lock the cells that have been changed. Does anybody know how to lock cells when the cell address and worksheet names are listed in 2 columns of a worksheet? The worksheet names will be needed not only for the cells that need to be locked, but to also unprotect and protect the worksheets before and after locking the cells. I have attached a copy of a workbook with 2 worksheets - some of my workbooks could have as many as 36 worksheets.
    Last edited by eherron; 10-12-2011 at 04:38 PM. Reason: Nobody has replied - to update where I am.

  2. #2
    Registered User
    Join Date
    10-03-2011
    Location
    Miami/Fort Lauderdale, Fl., USA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Lock cells in worksheet after they are changed

    Final Post in this Thread: Please go to new thread titled "Unlocking Cells in 1 worksheet based on Information stored in another worksheet" if interested in how this was resolved!

Closed 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