View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
pianoman[_15_] pianoman[_15_] is offline
external usenet poster
 
Posts: 1
Default Password Protecting a particular Sub


Dim password As String
Private Sub CommandButton4_Click()
password = "clearannual"
Set passwordinput = Application.InputBox(prompt:="Input Password to
Clear Annual Dates", Type:=2)
If passwordinput = password Then
Overduepdp
ProtectSheet
Else
response = MsgBox("Incorrect Password Supplied. Please try again",
vbOKOnly, "Clear Annual dates Password")
End If
End Sub

Obviously it's not working yet...


--
pianoman
------------------------------------------------------------------------
pianoman's Profile: http://www.excelforum.com/member.php...o&userid=33712
View this thread: http://www.excelforum.com/showthread...hreadid=544564