PC Review


Reply
Thread Tools Rate Thread

Attach password to Button?

 
 
mike
Guest
Posts: n/a
 
      16th Oct 2006
Seems like the simplest thing to do, but I can't find the first Google
result. I think all the results about protection are clogging up any
that might help me. I just want the user to be prompted for a password
before a certain macro runs.

Any suggestions welcome.

 
Reply With Quote
 
 
 
 
Zone
Guest
Posts: n/a
 
      16th Oct 2006
Mike, Try something like:
Sub MyMacro()
Dim pw as String
pw=inputbox("Enter password")
Select Case pw
Case "abcd","wxyz"
'execute your macro code
Case else
Msgbox "Invalid password"
Exit Sub
End Select
End Sub
James
mike wrote:
> Seems like the simplest thing to do, but I can't find the first Google
> result. I think all the results about protection are clogging up any
> that might help me. I just want the user to be prompted for a password
> before a certain macro runs.
>
> Any suggestions welcome.


 
Reply With Quote
 
mike
Guest
Posts: n/a
 
      16th Oct 2006
Slick. Thanks.

On Oct 16, 3:35 pm, "Zone" <jkend69...@aol.com> wrote:
> Mike, Try something like:
> Sub MyMacro()
> Dim pw as String
> pw=inputbox("Enter password")
> Select Case pw
> Case "abcd","wxyz"
> 'execute your macro code
> Case else
> Msgbox "Invalid password"
> Exit Sub
> End Select
> End Sub
> James
>
>
>
> mike wrote:
> > Seems like the simplest thing to do, but I can't find the first Google
> > result. I think all the results about protection are clogging up any
> > that might help me. I just want the user to be prompted for a password
> > before a certain macro runs.

>
> > Any suggestions welcome.- Hide quoted text -- Show quoted text -


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move the Attach button setames Microsoft Outlook Discussion 1 8th Mar 2010 10:48 PM
Attach button disabled Pawan Microsoft Excel Misc 0 1st Sep 2008 11:28 AM
Re: attach a control to a button Chris Microsoft C# .NET 2 3rd Aug 2005 02:41 PM
Using button to attach =?Utf-8?B?ZW5yaWNvMTk4Mg==?= Microsoft Access Forms 0 21st Dec 2004 01:29 PM
Re: Attach code to a button Steve C. Orr, MCSD Microsoft ASP .NET 0 29th Jul 2003 07:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:49 PM.