+ Reply to Thread
Results 1 to 7 of 7

Range("B1").Locked = False not working

  1. #1
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Range("B1").Locked = False not working

    Any idea why this would not work (title description)? I had to use the following.
    Please Login or Register  to view this content.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Range("B1").Locked = False not working

    It works for me, do you have the sheet protected?
    Here is the code without select.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: Range("B1").Locked = False not working

    Thanks for the reply davesexcel. Yes it was protected, but I put the code in to unprotect and protect, but still got an error. This happened a coupld of days ago, now I can't find the exact module or sheet which was causing the error. But I did want to get away from the ".select" code, which did not work, which did seem odd as to why.

  4. #4
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: Range("B1").Locked = False not working

    I just tried this, and it did not work. Commented lines is what worked before. Error I get is "Unable to set the locked property of the range class".
    Please Login or Register  to view this content.
    I also tried this as above. When I hover over it, it comes up with "Application.Range("F7").Locked = True = False
    Please Login or Register  to view this content.
    Last edited by thecdnmole; 11-15-2014 at 05:46 PM.

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Range("B1").Locked = False not working

    Guess you might have to attach a sample workbook with the offending code.

  6. #6
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: Range("B1").Locked = False not working

    Not happening, sorry. I spent a half hour last week desensitizing same spreadsheet and making it small enough to be put on forum to no avail, and it was a much more complicated issue than this. I will just leave this as is and maybe I will figure it out in time.

  7. #7
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: Range("B1").Locked = False not working

    This could be why, the cell causing the problem is part of a merged cell. But how to cure? I know, the three golden rules of vba and excel, thou shall not use merged cells!

+ 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] Disable Run-Time Errors "Application.DisplayAlerts = False" Not Working
    By Punx in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-12-2012, 03:03 PM
  2. Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" not working
    By redders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2011, 03:52 PM
  3. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  4. Replies: 7
    Last Post: 05-13-2006, 05:02 PM
  5. [SOLVED] IF(VLOOKUP("MYDATA", MYNAME, 4) = 0, "TRUE", "FALSE")
    By Souris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2005, 01: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