Protecting a worksheet/workbook with a password

G

Guest

Hi

I have been trying to run a macro that involves hiding some columns & rows and copy paste special (some values) then saving the workbook with the only data that my client's customers need to see.

That all works fine but when I go to tools, protection, protect worksheet and tick contents only and include a password (as part of the macro) when I run the macro Excel 2000 doesn't prompt me with the password- it simply allows me to go in and unprotect the worksheet.

I need to prevent unauthorised data editing after running the macro. I thought I could do this with a password.

Any ideas?
 
F

Frank Kabel

Hi
you may post your current used code (the relevant part).
Normally something like
activesheet.protect password:="yourpassword"

should do
-----Original Message-----
Hi

I have been trying to run a macro that involves hiding
some columns & rows and copy paste special (some values)
then saving the workbook with the only data that my
client's customers need to see.
That all works fine but when I go to tools, protection,
protect worksheet and tick contents only and include a
password (as part of the macro) when I run the macro Excel
2000 doesn't prompt me with the password- it simply allows
me to go in and unprotect the worksheet.
I need to prevent unauthorised data editing after running
the macro. I thought I could do this with a password.
 

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