+ Reply to Thread
Results 1 to 3 of 3

VBA unlock 3 cells for input then lock afterwards

  1. #1
    Registered User
    Join Date
    02-29-2016
    Location
    Lafayette, Indiana
    MS-Off Ver
    2013
    Posts
    19

    VBA unlock 3 cells for input then lock afterwards

    I have this code that works off of my active cell and then the userform outputs the 3 choices in the 3 cells directly right of the active cell. I'd like to have them locked since the userform enters the data in them, and then when the userform closes, the 3 cells are locked again.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: VBA unlock 3 cells for input then lock afterwards

    Hello,

    consider protecting the sheet with the "Userinterfaceonly" property when the workbook is opened. Then you don't have to use VBA to unprotect, change cells, re-protect. Put this in the ThisWorkbook module, save, close and re-open the file and your VBA will run on protected sheets.

    Please Login or Register  to view this content.
    cheers, teylyn

  3. #3
    Registered User
    Join Date
    02-29-2016
    Location
    Lafayette, Indiana
    MS-Off Ver
    2013
    Posts
    19

    Re: VBA unlock 3 cells for input then lock afterwards

    Brilliant Teylyn. Worked Great. I’ve searched for hours and never once saw this code. Thanks again.
    I do have one last problem to finish this 3 month project of mine if you're up for the challenge? I can’t seem to get anyone to solve it yet.


    http://www.excelforum.com/showthread...t=#post4362608

+ 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] Lock and Unlock several cells when a value is given
    By Mr_Focal in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-26-2015, 11:33 AM
  2. lock/unlock cell based on another cells input
    By 2funny4words in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-21-2013, 03:17 PM
  3. Lock and Unlock Cells with VBA
    By gelinasc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2012, 09:40 PM
  4. Lock/Unlock some cells in a row
    By processchip in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2011, 01:05 PM
  5. Lock and unlock cells conditionally depending on input in another
    By Frustrated in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-11-2005, 11:40 AM
  6. Lock and Unlock Cells
    By Peter in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-29-2005, 01:06 PM
  7. [SOLVED] Lock and Unlock cells using VBA
    By Peter in forum Excel General
    Replies: 1
    Last Post: 01-29-2005, 10:06 AM

Tags for this Thread

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