View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Martin
 
Posts: n/a
Default Unprotect sheet button!??

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

InputBox("Please type password")

"Neo1" wrote:


Hello I need some help to create a macro to unprotect worksheet but
before it does, to pop up the dialogue box asking user to enter
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 unprotect
the sheet I just need to click the button unprotect instead when the
excel file is opened.

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

Please I need help
Thanks a lot
From John


--
Neo1
------------------------------------------------------------------------
Neo1's Profile: http://www.excelforum.com/member.php...o&userid=30329
View this thread: http://www.excelforum.com/showthread...hreadid=527516