+ Reply to Thread
Results 1 to 3 of 3

Unprotect Range for editing on file open VBA

  1. #1
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Unprotect Range for editing on file open VBA

    Hello everyone,

    I am wanting to have my project open with cells in a named range "Data_Input", unprotected and available for edit. Everything else on the sheet, I would like to keep locked up. I have been trying various thing I have seen, but the issue is either the whole sheet seem protected, or not at all.
    Hopefully someone can get me down the right path.

    Currently, this is the little bit of code I have, but it doesn't seem to be doing the trick.

    Please Login or Register  to view this content.
    Patrick

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Unprotect Range for editing on file open VBA

    Hi

    Sheet protection is either On for the whole sheet or Off.
    The default setting for all cells is Locked, so when you switch protection ON, all cells would be locked.

    What you need to do is
    Unprotect your sheet.
    Select the range of cells where you want Data entry to take place and format the cells>Protection>and remove the check mark from Locked
    Then Protect your sheet and just leave it in that state.

    You will be able to enter or Amend any entries in the range you have chosen for Data Entry. You will not be able to amend any other cells.
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  3. #3
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Unprotect Range for editing on file open VBA

    Thank you Roger. It did exactly as I need.



    Patrick

+ 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. Macro to copy range from temp file to open file
    By 4luk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-02-2013, 02:22 AM
  2. [SOLVED] open variably named file, copy/paste data into consolidation file, open next file in list
    By sllawrence1968 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:49 PM
  3. File Locked for Editing When Not Open
    By sam314159 in forum Excel General
    Replies: 3
    Last Post: 05-10-2010, 01:38 PM
  4. Button to unprotect all open workbooks
    By manny_cb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2009, 11:18 AM
  5. [SOLVED] Trying to Open Excel File, But its says file is locked for editing
    By Smeeta Geary in forum Excel General
    Replies: 1
    Last Post: 09-20-2005, 09:05 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