Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can you make a user enter a password before a macro will run, and if so how. I have tried everything I could think of but am not well-versed in VB. Thanks for your help.
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In its simplest form:
Sub test() Dim PW As String PW = "Janet" If InputBox("Password") < PW Then Exit Sub 'Macro code here, like: MsgBox "Thank you for choosing Linux Redhat", _ vbInformation, "Installation complete" End Sub -- HTH. Best wishes Harald Followup to newsgroup only please. "DJ" wrote in message ... Can you make a user enter a password before a macro will run, and if so how. I have tried everything I could think of but am not well-versed in VB. Thanks for your help. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for responding to my question. But I don't
understand part of it ---does this go at the beginning of the code before my macro code....and where you have a quote mark and Macro code here, like: am I supposed to put something there??? Don't I need to put code in for the inputbox like what cell to be clicked in for this to be activated and the text like enter password?? I don't know and need for this to be explained in detail if you don't mind....thanks so much. With the way I have it right now - I keep getting a compile error saying expected: = -----Original Message----- In its simplest form: Sub test() Dim PW As String PW = "Janet" If InputBox("Password") < PW Then Exit Sub 'Macro code here, like: MsgBox "Thank you for choosing Linux Redhat", _ vbInformation, "Installation complete" End Sub -- HTH. Best wishes Harald Followup to newsgroup only please. "DJ" wrote in message ... Can you make a user enter a password before a macro will run, and if so how. I have tried everything I could think of but am not well-versed in VB. Thanks for your help. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Password protection in macro ( Anybody can view my password in VB | Excel Discussion (Misc queries) | |||
Macro (password) | Excel Discussion (Misc queries) | |||
Password and Macro | Excel Discussion (Misc queries) | |||
How to see macro code of a password protected macro without a password? | Excel Worksheet Functions | |||
password VBA and need for Macro | Excel Programming |