Unprotect sheet button!??

N

Neo1

Hello I need some help to create a macro to unprotect worksheet bu
before it does, to pop up the dialogue box asking user to ente
password to unprotect worksheet?

I got given this code from this forum:

Private Sub Worksheet_Activate()
ActiveSheet.Unprotect Password:=your password goes here
End Sub



but how do i apply it to a button so that whenever I want to unprotec
the sheet I just need to click the button unprotect instead when th
excel file is opened.

And also how can i make it so that each worksheet has a differen
password to unprotect it?

Please I need help
Thanks a lot
From Joh
 
G

Guest

Type the following instead of "your password goes here" in your existing code:

InputBox("Please type password")
 
N

Neo1

And how can i assign that VB code so that when i click a button which
made from autoshapes it opens up the dialogue box asking for th
password?

Thanks
From Joh
 

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