ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unprotect via prompt (https://www.excelbanter.com/excel-programming/310985-unprotect-via-prompt.html)

gavmer[_80_]

Unprotect via prompt
 

Hi all,

have a protected sheet that a user may need to amend. I therefore nee
a click event that will prompt for a password and unprotect the shee
so they can enter info. ANother click event to reprotect the sheet.

Thanks in advance all!!!!

--
gavme
-----------------------------------------------------------------------
gavmer's Profile: http://www.excelforum.com/member.php...nfo&userid=666
View this thread: http://www.excelforum.com/showthread.php?threadid=26268


rog

Unprotect via prompt
 
Hi

Add a couple of buttons to the sheet, and then use the
following code :

Private Sub CommandButton1_Click()

ActiveSheet.Unprotect InputBox("Enter password to
unprotect sheet")

End Sub

Private Sub CommandButton2_Click()

ActiveSheet.Protect InputBox("Enter password to
protect sheet")


End Sub

Rgds

Rog

-----Original Message-----

Hi all,

have a protected sheet that a user may need to amend. I

therefore need
a click event that will prompt for a password and

unprotect the sheet
so they can enter info. ANother click event to reprotect

the sheet.

Thanks in advance all!!!!!


--
gavmer
----------------------------------------------------------

--------------
gavmer's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=6662
View this thread:

http://www.excelforum.com/showthread...hreadid=262682

.



All times are GMT +1. The time now is 03:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com