Hi Gavin,
You could use something like
Sub Pwd()
Dim Pwd, Res
Pwd = "abracadabra"
Res = InputBox("Please Enter Password")
If Res < Pwd Then Exit Sub
End Sub
You can either call this Sub from your Unprotect macr or includenthe code
within the macro.
HTH
Don
--
"Gavin" wrote in message
...
Hi.
I have a macro that unprotects and protects a Sheet & Workbook, but I
want excel to prompt the user to provide the password as if they had
selected protect/unprotect from the menu. How do I do this?
Thanks for any help.
Regards
Gavin
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/