+ Reply to Thread
Results 1 to 5 of 5

Help Resolving Runtime Error "28": Out of stack space while conditionally locking cells

  1. #1
    Registered User
    Join Date
    07-23-2014
    Location
    USA
    MS-Off Ver
    Windows 7
    Posts
    23

    Help Resolving Runtime Error "28": Out of stack space while conditionally locking cells

    Can anyone assist me with the below code?
    I am trying to Lock/Unlock cells in a column based on data selected from data validation dropdown in another cell. However, I am getting runtime error 28 Out of stock space. My code is below and the error occurs on With Range("D5, D7, D9, D11, D13, D15, D17, D19, D21") line everytime i make a selection from the dropdown. The sheet is procted and all the cells are locked except the ones in the range above and the cell with the dropdown. What I want to do is lock and gray out the unlocked cells that dont apply to the selection made in the dropdown.

    Please Login or Register  to view this content.
    Thanks in advance with any assistance in resolving this error, or assistance with wha I am trying to do

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: Help Resolving Runtime Error "28": Out of stack space while conditionally locking cell

    See this thread: http://www.excelforum.com/excel-prog...ease-help.html


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    07-23-2014
    Location
    USA
    MS-Off Ver
    Windows 7
    Posts
    23

    Re: Help Resolving Runtime Error "28": Out of stack space while conditionally locking cell

    Thanks TMS for responding.
    I reviewed the link you provided and modified the code as shown below and it resolved the error.However now I am getting a different error in the section with With Range("D5:D21")

    If I use .Locked = True I get runtime error "1004" Unable to set the locked property of Range Class
    If I use .Locked I get compile error Invalid use of property
    any idea how to correct this?
    Please Login or Register  to view this content.
    Last edited by Seeki; 07-29-2015 at 10:41 PM. Reason: typo and incomplete thought

  4. #4
    Registered User
    Join Date
    07-23-2014
    Location
    USA
    MS-Off Ver
    Windows 7
    Posts
    23

    Re: Help Resolving Runtime Error "28": Out of stack space while conditionally locking cell

    TMS, Thanks again for the link you provided,

    I got it to work using the below

    Please Login or Register  to view this content.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: Help Resolving Runtime Error "28": Out of stack space while conditionally locking cell

    You're welcome.

+ 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] Runtime error '28'..... out of stack space solution!!
    By meus in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-12-2015, 05:58 AM
  2. Replies: 2
    Last Post: 07-29-2014, 12:31 PM
  3. [SOLVED] "Out of Stack Space" error vba Excel 2010
    By Taemex in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-05-2014, 02:40 AM
  4. Runtime Error 28 Out of stack space = headache!
    By SportyJim1979 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-21-2012, 09:06 PM
  5. Error: "Out of stack space"
    By richbennett in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2010, 05:07 AM
  6. [SOLVED] Merged cells cause "Runtime error 13 type mismatch" problem
    By Ralph Malph in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2006, 08:55 AM
  7. Run time error - "out of stack space"
    By Tempy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2005, 02:01 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