I have 3 cells which are merged with each other and are referenced to with a given cellname (for example "foo").
I now want to unlock these cells with the locked
attribute.
The lock in the following code will not work, but the value will be successfully assigned to the cell:
Workbooks(loadedSheetName).Worksheets("foo").Range("bar").Locked = False
Workbooks(loadedSheetName).Worksheets("foo").Range("bar") = "foo value"
What will work is referencing the cells by "coordinates" but is not really an option for me:
Workbooks(loadedSheetName).Worksheets("foo").Range("B3:E3").Locked = False
Is there any possibility to select some merged cells by name and set the locked
attribute to false?