I would like to protect 3 columns using VBA. Protection should go as long as there is data.
I measure the end of my data in column A and to find the last row I use:
LastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
Now, to protect 3 columns I used this code, but it doesn't work...