Using a macro to protect a sheet after the information update.

P

Patrick Antus

I have a form with 3 tabs on it. There are specific fields that they are
allowed to enter in their time. It is protected right now with a password and
my PMP team will use it to document time for their projects. After the
initial assessment of a project, my team runs a macro that takes the
protection off then deletes the range of cells that they were allowed to
enter their time and protects the entire worksheet. I have created a macro
to lock the entire sheet but I have been unable to protect the sheet using a
password inside of a macro. As the file stand now the customer can click on
tools/protection/unprotect and change any field they want. I created the
macro because my team members are not that excel savy.
 
T

Tom Ogilvy

Activesheet.Protect Password:="ABC"

protects the sheet with a password for me.

Activesheet.Unprotect Password:="ABC"

unprotects it after the password is applied.
 
P

Patrick Antus

Thank you Tom. I needed that "=". Excel help did not come close to helping
but you did.
 

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