Hi all, first time posting.
I have searched and found many examples of code that will lock cells once data has been entered. But for some reason, I cannot get it to work in my workbook. The weird thing is, I have successfully got them to work on blank workbooks. I unlock a range I want people to be able to edit, I protect the workbook, I enter the code, and it works. But I do the same thing on my workbook, nothing locks. Can anyone think of any possible reasons for this? I've tried locking all the cells on a sheet, and only unlocking a small range, as in the examples (A1:A10), and I cant get it to work. I've tried not pre-protecting the sheet, I've tried 4 or 5 different examples of code. If it wasn't for the fact I've gotten it to work on blank workbooks, I'd think VBA was disabled or something. I can't post a copy of my workbook for you all to look at because its on a stand-alone computer at work (and the USB is disabled for info-sec).
When I hit 'View Code' on the sheet, and paste in the code, is there something else I need to do? It's almost as if the code is going in, but not running? I'm not a complete programming noob (did C++ back in the day), but VBA is new to me.
Excel Version 2007
Thanks
Bookmarks