+ Reply to Thread
Results 1 to 14 of 14

Conditional Format not working in a Protected Table

Hybrid View

  1. #1
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: Conditional Format not working in a Protected Table

    This seems to work. Change the password to whatever you want. If you set the worksheet protection manually, meaning how you want it. Select locked or unlocked cells etc., then when you run this you should find the new row unlocked and the other cells locked with the settings you specified.

    Good Luck.

    Sub CopyRow()
    Dim ws As Worksheet, x As Range
    Set ws = Worksheets("Error Report")
    ws.Unprotect ("password")
            With ws.ListObjects("Table2")
                .DataBodyRange.Locked = True
                .ListRows.Add
     Set x = .ListRows(.ListRows.Count).Range
                x.Locked = False
            End With
        ws.Protect ("password")
    End Sub
    is there a way to prevent the end user from going to the developer tab > macro or view code to see the password?
    In the Visual Basic Editor > Tools > VBA Project Properties > Protection Tab, the rest is self explanatory.
    Last edited by skywriter; 09-03-2015 at 05:23 PM.

+ 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. [SOLVED] Conditional Format not working as expected
    By scudo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-10-2015, 10:44 AM
  2. [SOLVED] Conditional Format not working
    By Adam Schaefer in forum Excel General
    Replies: 1
    Last Post: 03-16-2015, 10:22 AM
  3. conditional format not working
    By Roger_the_Dodger_55 in forum Excel General
    Replies: 2
    Last Post: 03-07-2013, 07:56 PM
  4. conditional format not working
    By Roger_the_Dodger_55 in forum Excel General
    Replies: 2
    Last Post: 03-07-2013, 07:02 PM
  5. Keep format of data table after insert a new row on a protected sheet
    By RickyC in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2010, 10:58 AM
  6. Conditional Format not working
    By additude in forum Excel General
    Replies: 20
    Last Post: 09-12-2008, 06:19 AM
  7. [SOLVED] Conditional Format Not Working
    By KMH in forum Excel General
    Replies: 0
    Last Post: 12-22-2005, 01:35 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