+ Reply to Thread
Results 1 to 3 of 3

Help with code to lock cell range during Macro.

  1. #1
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    846

    Help with code to lock cell range during Macro.

    Evening Hapy Campers,

    So far i have a code that Jaslake has given some cracking input into (exceptionally appreciated mate)
    I now have another question.
    Now i have modifed parts of the original code to add some subtle changes, i wont post it all as its massive, my request relates to the section
    Please Login or Register  to view this content.
    This one works fine, as it unlocks the cell range of J23:35.
    I need to then re-lock the range (which is a seperate code) which i thought i could do with the following
    Please Login or Register  to view this content.
    but when i run this i get the following Run-Time error '1004: Unable to set the locked property of the range class, when i click debug it highligts the following
    Please Login or Register  to view this content.
    Can anyone pointout where i am failing? if you need to see both codes in there entirety then i will post, but they are very long!!!

    galvinpaddy
    Last edited by galvinpaddy; 04-04-2012 at 02:43 PM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Help with code to lock cell range during Macro.

    Hi galvinpaddy
    If it's Protected, you'll need to Unprotect the worksheet first...and you don't need to select
    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    846

    Re: Help with code to lock cell range during Macro.

    As usual fella, fantastic. thanks so much for the input into this sheet!
    Greatly appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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