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


Hi All,
I'm looking to put in some sort of protection that will require a
password to run a particluar sub in an excel file. The sub will be
attached to a button...

I had thought that I should pop up an input box (somehow!) and then
compare the input from the user to a defined constant in the code... is
this the best way, and if so, how do I write the input box code?

Here's the button code as it stands... it's nothing special!

Private Sub CommandButton4_Click()
Overduepdp
ProtectSheet
End Sub

Thanks all.

Gareth


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