ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protecting & Unprotecting worksheet (https://www.excelbanter.com/excel-programming/397568-protecting-unprotecting-worksheet.html)

Tammy H

Protecting & Unprotecting worksheet
 
Hi,
I have a worksheet that when the user checks a certain checkbox certain rows
and checkboxes are hidden. This sheet needs to be protected, but when I
protect the sheet and click on the checkbox I get an error in the code that
hides the rows. Works fine when the sheet is not protected. Any ideas???



Bill Renaud

Protecting & Unprotecting worksheet
 
Tammy wrote:
<<...when I protect the sheet and click on the checkbox I get an error
in the code that hides the rows.

You probably will have to unprotect the worksheet before trying to hide
or unhide the rows. Protect the worksheet the very last thing.

Please post your code, if you need more specific help (as always in this
newsgroup).
--
Regards,
Bill Renaud




Alain Vaillancourt

Protecting & Unprotecting worksheet
 
You need to use the Unprotect method of the Worksheet at the begining of
your code and the Protect method at the end.
As the password will appear in the code, you will need to "Lock project for
viewing" if not already done.


"Tammy H" wrote in message
...
Hi,
I have a worksheet that when the user checks a certain checkbox certain
rows
and checkboxes are hidden. This sheet needs to be protected, but when I
protect the sheet and click on the checkbox I get an error in the code
that
hides the rows. Works fine when the sheet is not protected. Any ideas???



Tammy H

Protecting & Unprotecting worksheet
 
I was able to use the Unprotect and protect methods.

Thanks for everyones help. I can always count on this group.

Tammy

"Alain Vaillancourt" wrote:

You need to use the Unprotect method of the Worksheet at the begining of
your code and the Protect method at the end.
As the password will appear in the code, you will need to "Lock project for
viewing" if not already done.


"Tammy H" wrote in message
...
Hi,
I have a worksheet that when the user checks a certain checkbox certain
rows
and checkboxes are hidden. This sheet needs to be protected, but when I
protect the sheet and click on the checkbox I get an error in the code
that
hides the rows. Works fine when the sheet is not protected. Any ideas???





All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com