Posted 17 September 2019, 10:19 am EST - Updated 29 September 2022, 3:08 pm EST
I am having an issue with making drop-down boxes “read only”, I am looping through each cell on each sheet and locking it but the drop-down cells aren’t getting locked.
I’m locking cells this way:
foreach (var s in this.Sheets)
{
if (s != null)
{
s.Protect = true;
this.Protect = true;
for (var row = 0; row < s.Rows.Count; row++)
{
for (var column = 0; column < s.Columns.Count; column++)
{
s.Cells[row, column].Locked = true;
}
}
}
}