+ Reply to Thread
Results 1 to 3 of 3

Row-by-row protection on a worksheet

  1. #1
    Registered User
    Join Date
    10-16-2013
    Location
    Jacksonville, FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Row-by-row protection on a worksheet

    I am new to VBA and Excel and am trying to figure out a way to protect a worksheet row-by-row.

    What I mean is if we have 10 rows of new data, a user can select (by a button?) a row to be protected from editing, perhaps skip two rows, then select row 4 and 5 to also be protected. This would leave a sheet open to editing on the rows not selected for protection.

    It would also be necessary to have this same ability to be able to be turned off as easily. So in effect, a button (or other means of selection) that turns protection on and off, one row at a time.

    It feels like there should be a fairly straightforward way to do this in VBA, but I am not able to visualize it.
    Last edited by oracle741; 11-05-2013 at 09:35 AM.

  2. #2
    Registered User
    Join Date
    10-16-2013
    Location
    Jacksonville, FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Row-by-row protection on a worksheet

    So I worked out a method to lock it row by row. I am using a command button to call some code. The user will select a particular column in the row that will be locked.

    two problems:
    1. it only selects columns 'A' - 'I' omiting 'J - L'
    2. throws a "run-time error '424'" on the 'Worksheet.Protect = False' line

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-16-2013
    Location
    Jacksonville, FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Row-by-row protection on a worksheet

    By trial and error, this seems to do the trick.

    Please Login or Register  to view this content.

+ 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] Worksheet protection is gone and only wokbook protection can be se
    By Eric C. in forum Excel General
    Replies: 4
    Last Post: 05-02-2006, 11:55 AM
  2. [SOLVED] Worksheet protection
    By inay in forum Excel General
    Replies: 0
    Last Post: 02-23-2006, 06:40 PM
  3. Worksheet Protection
    By mellowe in forum Excel General
    Replies: 0
    Last Post: 02-17-2006, 12:05 PM
  4. Protection of a worksheet
    By [email protected] in forum Excel General
    Replies: 3
    Last Post: 01-24-2006, 01:10 AM
  5. [SOLVED] protection of your worksheet
    By Timwig in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-16-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