Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Attach password to Button?

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Attach password to Button?

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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Attach password to Button?

Slick. Thanks.

On Oct 16, 3:35 pm, "Zone" 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Attach button disabled Pawan Excel Discussion (Misc queries) 0 September 1st 08 11:28 AM
Mailto / Attach... Button to do so? Siggsy007[_4_] Excel Programming 0 September 21st 04 08:43 AM
Mailto / Attach... Button to do so? Siggsy007[_2_] Excel Programming 2 September 21st 04 12:40 AM
Mailto / Attach... Button to do so? Siggsy007[_3_] Excel Programming 0 September 20th 04 05:04 PM
Mailto / Attach... Button to do so? Siggsy007 Excel Programming 1 September 20th 04 11:38 AM


All times are GMT +1. The time now is 03:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"