garyreid81
New Member
- Joined
- Sep 27, 2016
- Messages
- 1
Hello All,
Can anyone help with auto locking cells when the saved button is pushed.
I used the code from the following thread, but the thread has since gone dark:
http://www.mrexcel.com/forum/excel-...k-cells-after-data-entry-when-file-saved.html
My problem is similar to here, except I have 30 sheets to protect, so I named each 'InputRange' for each sheet (Ex: 1!A1:J100, 2!A1:J100, etc). I copied the code into the 'ThisWorkBook' area, as well as on each sheet, for it to work.
My problem is that it seems to not work 100% of the time. If I close the workbook, and re-open it, the locking starts to work again on that sheet. Then perhaps a different sheet wont work. Sometimes it works flawlessly.
One thing I noticed is when I open the workbook, I get a security warning at the top saying 'Macros have been disabled' and a box to click to 'Enable Content', which I press. When I check the Macro settings in the Trust Centre Settings, Excel is set to 'Disable all macros with notification.' Is this the correct setting? There is an option to 'Enable all macros (not recommended; potentially dangerous, code could run)'
Any help would be appreciated.
Can anyone help with auto locking cells when the saved button is pushed.
I used the code from the following thread, but the thread has since gone dark:
http://www.mrexcel.com/forum/excel-...k-cells-after-data-entry-when-file-saved.html
My problem is similar to here, except I have 30 sheets to protect, so I named each 'InputRange' for each sheet (Ex: 1!A1:J100, 2!A1:J100, etc). I copied the code into the 'ThisWorkBook' area, as well as on each sheet, for it to work.
My problem is that it seems to not work 100% of the time. If I close the workbook, and re-open it, the locking starts to work again on that sheet. Then perhaps a different sheet wont work. Sometimes it works flawlessly.
One thing I noticed is when I open the workbook, I get a security warning at the top saying 'Macros have been disabled' and a box to click to 'Enable Content', which I press. When I check the Macro settings in the Trust Centre Settings, Excel is set to 'Disable all macros with notification.' Is this the correct setting? There is an option to 'Enable all macros (not recommended; potentially dangerous, code could run)'
Any help would be appreciated.