Results 1 to 8 of 8

If one cell contain certain word, then total row will be hide and protect

Threaded View

  1. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,085

    Re: If one cell contain certain word, then total row will be hide and protect

    Is it what you want
    Overall see file attached
    Option Explicit
    
    Private Sub Worksheet_Change(ByVal Target As Range)
    Const WkPW As String = "MyPassWord"
    Const WkKW As String = "HIDDEN"
       If (Target.Column <> 3) Then Exit Sub
       If (Target.Value = WkKW) Then
          Rows(Target.Row & ":" & Target.Row).EntireRow.Hidden = True
          Rows(Target.Row & ":" & Target.Row).EntireRow.Locked = True
          With Sheets("Data")
              .Protect Password:=WkPW, UserInterfaceOnly:=True
          End With
       End If
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hide Formulae in cell and to protect it with Password
    By jon112211 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-05-2015, 10:17 AM
  2. Replies: 1
    Last Post: 12-08-2013, 06:30 PM
  3. how to work out rate based on total time and total amount
    By lisaathers in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-09-2013, 06:44 AM
  4. Replies: 2
    Last Post: 01-17-2013, 08:39 AM
  5. Replies: 4
    Last Post: 04-11-2012, 09:59 AM
  6. how to hide and password protect comments in a cell
    By qmc in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 12-25-2008, 12:07 PM
  7. Using a Cell to Hide/Unhide a Work Sheet
    By drgogo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-09-2008, 02:12 AM

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