+ Reply to Thread
Results 1 to 3 of 3

Sheet Unlock it self on Entry

  1. #1
    Registered User
    Join Date
    12-29-2012
    Location
    USA
    MS-Off Ver
    Office 2019
    Posts
    37

    Sheet Unlock it self on Entry

    Hello and thank for your help in advance.
    I have a sheet that has the below vba code, the problem is that sheet will unlock itself every time I enter new entry on any section on that sheet.
    and the if I change this line "Sheets("Sheet1").Unprotect Password:="abc" '<---- Change as required" to "Sheets("Sheet1").Protect " it will throw a debug and highlight
    the line below with yellow
    Range(Cells(6, Target.Column), Cells(20, Target.Column)).Find(Target.Value).Value = ""

    * Kindly i need the sheet to stay protected at all times for the locked row and column.


    This is the VBA code currently is in use .

    Administrator's note: Please take the time to review our rules. There aren't many, and they are all important. Our guidelines recommend code tags. I have added them for you this time because you are a new member. I also moved your thread to the VBA subforum. --6StringJazzer
    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 01-27-2024 at 11:50 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Sheet Unlock it self on Entry

    You are unprotecting the sheet to make a change, but you are not protecting it again when you finish. Add code as shown.
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    12-29-2012
    Location
    USA
    MS-Off Ver
    Office 2019
    Posts
    37

    Re: Sheet Unlock it self on Entry

    Sorry , now i got to know the code rule, my apology!

+ 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. unlock tab upon password entry
    By michael35 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2021, 08:26 AM
  2. [SOLVED] Macro to unlock sheet, copy to new workbook, then re-lock original sheet
    By Foos Master in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-08-2015, 09:16 PM
  3. [SOLVED] Toggle Button to Unlock Sheet with Set Password and Unhide Rows and Relock Sheet
    By nwb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-20-2014, 06:16 PM
  4. Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  5. Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  6. Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. Replies: 2
    Last Post: 04-17-2005, 02:06 PM

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