Could you please tell me how to sort out values while my excel sheet is blocked. When I click on my push button for sorting out, it results in an error.
Can't sort whilst the sheet is protected
Presumably, you have some code attached to a button that does the sort...
before the sort code have the line
activesheet.unprotect password:="password"
and after the sort code
activesheet.protect password:="password"
obviously, change "password" to whatever the sheet's password is...
Rgds
Geoff "Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
There is also an additional parameter to Protect
"UserInterfaceOnly:=True" which prevents the user changing the worksheet but allows it to be changed by macros. It is reset when the file is loaded so you need to put it in the Autpen macro if you want it implemented each time the workbook is loaded.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.