• lock on merged cells (NL XL 2003)

    Author
    Topic
    #455050

    Hello All,

    I have some merged cells in my sheet and they have there own name.
    The strange thing is that when Í select the cell en change the properties to locked = true it is all okay,
    but when I do the same using VBA “range(“cellname”).locked=true” this gives me an error.
    It seems only to happen with merged cells.

    So to confirm… Am I not able to lock or unlock merged cells by VBA code?

    Thanks for your reactions.

    Viewing 0 reply threads
    Author
    Replies
    • #1131268

      If you check the name definition, does it refer to all the cells that make up the merged area, or just the top left one? If it refers to all of them, then the code should work. (If you named the range using the name box, it probably only refers to the top left cell, and you will get an error)

      • #1131278

        You are a livesaver.
        Thanks, you hit the nail on it’s head

    Viewing 0 reply threads
    Reply To: lock on merged cells (NL XL 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: