How to lock Excel cells in VBA?
问题 I have an Excel worksheet that acts like an application, with form control buttons allowing users to 'navigate' through records. First, Previous, Next & Last cycle appropriately through one of the worksheets records, displaying the values in my 'form' worksheet. When users are not in Edit or Add Mode, I would like to lock the cells to prevent users from modifying contents. I tried Range("A1:O24").Locked = True, but I am still able to type new values into the cells. Anyone know how to