+ Reply to Thread
Results 1 to 4 of 4

Lock a cell based on value in another cell. Excel for MAC 2011 NOT PC

  1. #1
    Registered User
    Join Date
    07-28-2009
    Location
    Seattle
    MS-Off Ver
    Excel Mac 2011
    Posts
    38

    Lock a cell based on value in another cell. Excel for MAC 2011 NOT PC

    Hello,
    I found this code in another forum. I have no experience in VBA but I can follow the logic and it should do what I want. My difficulty is that I cannot enter the code successfully in my Excel for MAC. I see the Editor, Macros and Record buttons and can type in the code, and edit it, but it does not seem to "take". I need the code to run continuously any time the spreadsheet is open, ie, not only on demand.

    Please Login or Register  to view this content.
    Best for my application would be if the "B1" range were to also change fill color when locked versus unlocked. So I can see at a glance if the cells are locked or not.

    Step by step instructions for a dummy needed, for a MAC installation, (not for a PC).

    Help would be greatly appreciated!!

    Peter
    Last edited by Fotis1991; 09-13-2013 at 11:38 AM. Reason: added code tags

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Lock a cell based on value in another cell. Excel for MAC 2011 NOT PC

    Hi Peter.

    We are waiting for a long time member(like you)-even with few posts- to know the forum rules. Pls take a look to these, because:

    Use code tags around code.

    Posting code between
    Please Login or Register  to view this content.
    tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here


    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,265

    Re: Lock a cell based on value in another cell. Excel for MAC 2011 NOT PC

    Peter,

    In the VB Editor, you need to double-click the worksheet (not workbook) object for which you want that code to run and then paste the code in there. Then ensure the file is saved as a macro enabled file.
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    07-28-2009
    Location
    Seattle
    MS-Off Ver
    Excel Mac 2011
    Posts
    38

    Re: Lock a cell based on value in another cell. Excel for MAC 2011 NOT PC

    Hi Fortis1991, thanks I will do in the future.

    Rory, Thanks for your response. When I enter via the VB Editor, the code does save, progress! But my code as posted in my post above doesn't work. Must be something simple , it looks very similar/same as a couple of other codes that came up on this forum that apparently do work for their user. Would you take a look at my code above? I think that I'm just one keystroke away from success.
    And also if you could, give consideration to cell B1 changing color when it is locked/unlocked.

    Thanks much,

    Peter

+ 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. sum cell values by criteria there cell color (Excel Mac 2011)
    By Opi12 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 02-25-2015, 07:58 AM
  2. Replies: 1
    Last Post: 09-12-2013, 10:38 PM
  3. Replies: 1
    Last Post: 03-11-2013, 03:10 PM
  4. Replies: 1
    Last Post: 03-10-2013, 01:54 PM
  5. [SOLVED] Lock data in a cell a specific cell based on selection on other ce
    By CrimsonPlague29 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-10-2006, 06:10 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