+ Reply to Thread
Results 1 to 4 of 4

Cell/Range locked after automated resize code runs under Worksheet_Change tab

  1. #1
    Registered User
    Join Date
    01-20-2014
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    3

    Cell/Range locked after automated resize code runs under Worksheet_Change tab

    I used the following code to automatically re-size a cell to fit the notes entered:

    Please Login or Register  to view this content.
    Unfortunately, it keeps setting the range ("Notes") to locked after it runs the re-size code.
    Being that the worksheet I am creating deals with locked and unlocked cells for ease of entry by the user, this is creating problems.
    As soon as it resizes the range ("Notes"), it locks it, and the worksheet remains protected. Then the user is unable to go back and edit what they typed into the notes range.

    Does anyone know where I could insert something to unlock the range during it's resize action?

    I have tried to insert things like the following code in random places within the above code, but it continues to lock the range.

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    01-20-2014
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Cell/Range locked after automated resize code runs under Worksheet_Change tab

    Still can't get this to work correctly. The workbook can be found here:
    https://www.dropbox.com/s/h0g2u3mqej...it%20copy.xlsm

    My macros I wrote are all present in there.

    Any help is greatly appreciated!

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Cell/Range locked after automated resize code runs under Worksheet_Change tab

    I added 3 lines to your code (in red) and I think it does what you are looking for?

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-20-2014
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Cell/Range locked after automated resize code runs under Worksheet_Change tab

    That fixed it! Thank you!

    All is well and it is now working as originally intended.

+ 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. Worksheet_Change Runs Differently When Data Entered vs. Cell Cleared
    By danderson2692 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2013, 02:39 PM
  2. How to modify Worksheet_Change Macro VBA code from Range to Cell
    By AGCSC1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2013, 04:23 PM
  3. Define range to select from current cell in a full range (using worksheet_change)
    By draddy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-07-2013, 11:48 AM
  4. help in changing the code that runs on one cell to the whole column
    By hiteshasrani43 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-07-2012, 10:29 AM
  5. Refining when a worksheet_Change event runs with perhaps ISodd or similar
    By Wobbles in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-19-2011, 09:06 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