+ Reply to Thread
Results 1 to 4 of 4

Protect a sheet in Excel but leave some cells unlock with VBA

  1. #1
    Forum Contributor
    Join Date
    09-21-2015
    Location
    nederland
    MS-Off Ver
    2021
    Posts
    206

    Protect a sheet in Excel but leave some cells unlock with VBA

    Dear All,

    Please help how to resolve this issue :

    I have data on cells A to D

    - I would like to protect a sheet range A1:C10 from editing en leave cel D unlock ( see attacement)
    - I would like user allow to format columns and format rows ( see picture)

    I use below VBA but is not working

    Please Login or Register  to view this content.

    Thank you
    Kirana
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Protect a sheet in Excel but leave some cells unlock with VBA

    Hi Kirana,
    once the spreadsheet is locked the code is not working anymore
    But to unlock column D you can use
    Please Login or Register  to view this content.
    Cheers
    Erwin
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  3. #3
    Forum Contributor
    Join Date
    09-21-2015
    Location
    nederland
    MS-Off Ver
    2021
    Posts
    206

    Re: Protect a sheet in Excel but leave some cells unlock with VBA

    Dear Erwin,

    Still not working see below

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Protect a sheet in Excel but leave some cells unlock with VBA

    Hi,
    my bad, I assumed that you knew where to place this.

    Best is to do this like this:
    Please Login or Register  to view this content.
    Cheers
    Erwin

+ 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. Edit existing marco to unlock protect sheet, remove set criteria and re protect sheet
    By summer2010 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2013, 09:29 AM
  2. Macro to unprotect sheet --> unlock cells --> protect again
    By hrhittn23 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-02-2011, 07:00 AM
  3. Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  4. Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  5. Replies: 0
    Last Post: 09-06-2005, 04:05 AM
  6. Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  7. Replies: 1
    Last Post: 06-24-2005, 09:59 AM
  8. Replies: 1
    Last Post: 06-23-2005, 09:05 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