Worksheet Password Protection in VBA

  • Thread starter Thread starter Graham
  • Start date Start date
G

Graham

Hi,

I have a workbook in which users are inputting data via
user forms. Each time data is entered, or the file changed
I am protecting the sheets, but without a password, using
the following script.

ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True

Is there script (or other method) that I can use to assign
a password so that the worksheets are protected with
password and cannot be amended by simply clicking
Tools>Unprotect Worksheet?


Help gratefully received
 

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

Back
Top