Need to password protect work sheet and unhide rows.

G

Guest

I have a worksheet that I need end users to fill out. I also have a forms
check box that is active and linked to a macro, so if the user clicks on the
check box, I need to unhide additional rows for them to fill out.

However, when I turn on protection, I am getting an error. I also notice
that the hide/unhide features are greyed out.

Thanks.
 
J

JP

Hello,
What error are you getting, and what version of Excel do you have?

I think there is one or two things you could do. Try either of these,
one should work.

1. When you protect the sheet (Tools|Protection Menu) there should be
an option to allow the user to do certain things to the workbook, i.e.
format cells, insert rows, etc

2. Add this line to your macro code:
Sheets("sheetname").UnProtect userinterfaceonly:=true

This will allow the macro to make changes to a protected sheet.


Hope this helps,
JP
 
G

Guest

Thanks for the assistance.

I wasn't able to find anything under option #1.
Option #2, I added that in, but I had to remove the : from the line.
I then added a protect line back in.

However, a couple of things.
1. I am not able to use a password to protect it. When I put a password in
and run the macro, it tells me password does not match.
2. I am not able to protect any of the cells in the rows that I want to
hide/unhide.

If you have any ideas for those that would be great.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top