Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Password To Run Macro?

Hi,

You could put this as the first lines of your code which gives you 3 chances
to enter the corrrect case sensitive password. It isn't secure because the
passwoord is visible when entered but even if you use a userform textbox to
mask the passowrd that isn't secure either

Do
response = InputBox("Enter password", "Run Macro")
If response < "Mypass" Then
x = x + 1
If x 2 Then Exit Sub
Else
MsgBox "Running macro"
Exit Do
End If
Loop
'your code

Mike

"garyh" wrote:

Is there a way to request a password when a macro button is clicked? I
would like to 'lock' down the macros.

Thanks.

G

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
Password protection in macro ( Anybody can view my password in VB Sherees Excel Discussion (Misc queries) 2 January 24th 10 10:05 PM
Macro on Password acss Excel Programming 1 July 21st 08 05:36 PM
PASSWORD REMOVAL I have the password to open the file and the password to modify the file now how to remove them LJ[_4_] Excel Programming 0 April 27th 06 03:18 AM
How to see macro code of a password protected macro without a password? Dmitry Kopnichev Excel Worksheet Functions 5 October 27th 05 09:57 AM
How to see macro code of a password protected macro without a password? Dmitry Kopnichev Excel Programming 5 October 27th 05 09:57 AM


All times are GMT +1. The time now is 12:41 PM.

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

About Us

"It's about Microsoft Excel"