+ Reply to Thread
Results 1 to 6 of 6

protecting cels based on its values possible?

  1. #1
    Registered User
    Join Date
    12-21-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    5

    protecting cels based on its values possible?

    In column A listed are the dates. I want to protect those rows that are < the current date. I am making a ledger using excel and I don't want user to edit data which was encoded prior to the present date. Is this possible?
    Last edited by chrisumali; 12-21-2009 at 02:50 PM. Reason: to be more clear

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Re: protecting cels based on its values possible?

    try This,
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-21-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: protecting cels based on its values possible?

    WOW it works thanks man, but if I try to insert password error prompted me. Can you please help me with this, how could I enter password in the code and no one can view that password when they go to vb editor?

    Is it possible also to run this macro upon every exit?

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Re: protecting cels based on its values possible?

    Please Login or Register  to view this content.
    Check out going to VBA editor, tools,vbaProperties

  5. #5
    Registered User
    Join Date
    12-21-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: protecting cels based on its values possible?

    Thanks DAVESEXCEL!

    Ok everything is fine up to now, But one more thing. How this macro run every time user exists excel? or a macro with dialog box that will pop-up before closing saying, "You are about to exit, any entries you have made will become final and will not be edited except through authorized adjustments" then pressing ok will run the previous Macro protecting the Cell,

    Thanks Good there is you willing to give me a hand...

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Re: protecting cels based on its values possible?

    Quote Originally Posted by chrisumali View Post
    Thanks DAVESEXCEL!

    Ok everything is fine up to now, But one more thing. How this macro run every time user exists excel? or a macro with dialog box that will pop-up before closing saying, "You are about to exit, any entries you have made will become final and will not be edited except through authorized adjustments" then pressing ok will run the previous Macro protecting the Cell,

    Thanks Good there is you willing to give me a hand...
    This statement would not be true, if the workbook was opened again on the same day.
    You could activate the code on the workbook_open event .
    Or the
    Worksheet_selectionChange event.
    Please Login or Register  to view this content.
    Right click on the sheet tab and select view code, paste the code there.
    Not tested, just assuming it will work.

+ 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