I am using Excel where certain fields are allowed for user input and other cells are to be protected. I have used Tools Protect sheet, however after doing this I am not able to change the values in the VBA script. I need to restrict the sheet to stop user input, at the same time allow the VBA code to change the cell values based on certain computations.
Share
Try using
If the
UserInterfaceOnlyparameter is set to true, VBA code can modify protected cells.Note however that this parameter does not stick. It needs to be reapplied each time the file is opened.