Locking components BUT Still allowing to change settings via V
I am not sure if this is suppose to be like this but if I protect a sheet and
then use unprotect and protect in the VBA code, I still can not use the
scroll bar correctly.
If I protect the sheet, can the scroll bar still scroll or is it unable to
be changed by using the mouse to change the position?
Thanks.
--
Stan
"K Dales" wrote:
When you have protected a sheet or workbook, not even VBA can change it. But
the solution is easy: have your code unprotect the sheet, make the changes,
and then reprotect it immediately:
Sheets("MyWorksheet").Unprotect
' Code here to work with sheet/change cell values
Sheets("MyWorksheet").Protect
--
- K Dales
"Stan The Man" wrote:
Hi. I am relatively new but I am trying to lock/protect scroll bars etc
which I can do. However, I have code in VBA which I want to set the Max and
Min etc but which does not work (error will occur) after the sheet is
protected.
I also can not set any specific cells sometimes also. Am not quite sure
what I can do. I want it that it CAN NOT MOVE and also can not change scroll
max and min but only through VBA once all sheets are protected.
Thanks in advance!
--
Stan
|