+ Reply to Thread
Results 1 to 4 of 4

protect cell content after save

  1. #1
    Registered User
    Join Date
    08-06-2011
    Location
    kano,Nigeria
    MS-Off Ver
    Excel 2007, 2010 ,2013
    Posts
    32

    protect cell content after save

    How can I protect the information of a cell after the user writes in the cell?

    I would like to protect the information after the user saves and closes the workbook and prevent the user from changing the information after saving and when opening the workbook the second time except with a password.
    if this is possible with macro, any assistance will be appreciated
    Last edited by ENEMALI; 11-17-2011 at 02:10 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: protect cell content after save

    Hi Enemali,

    Add this code to the 'ThisWorkbook' code module in the VB Editor (ALT+F11):
    Please Login or Register  to view this content.
    Substitute "your-password-here" with a password of your choice. This code will run when the user saves the workbook and will password protect every worksheet with the same password.

    You can then prevent them from viewing the code (including your password) by protecting the VB Module. In the VB Editor click Tools > VBA Project Properties > Protection tab. Select "Lock project for viewing" and enter a password only you know. Don't forget it, or you won't have access to the code either.

    Excel is not a secure environment, so the determined user can break in, but this will keep most users out.

  3. #3
    Registered User
    Join Date
    08-06-2011
    Location
    kano,Nigeria
    MS-Off Ver
    Excel 2007, 2010 ,2013
    Posts
    32

    Re: protect cell content after save

    thanks Paul
    it works perfectly
    keep on your good work

  4. #4
    Registered User
    Join Date
    08-06-2011
    Location
    kano,Nigeria
    MS-Off Ver
    Excel 2007, 2010 ,2013
    Posts
    32

    Re: protect cell content after save

    a little assistance please
    the macro above work as i wanted initially but now i want it to lock only cells containing datas leaving empty cells for data input but when filled, it locks it when saved
    thanks in advance

+ 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