Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User form- protection and password.
How to protect a userform (code + object) by assigning a password?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
User form- protection and password.
Hi Tungana,
=========== How to protect a userform (code + object) by assigning a password?=========== Try password protecting the VBA project: In the VBE, Menus | Tools | VBAProject Properties | Protection | Lock Project for viewing [x] | Enter and confirm Password | OK Save, close and re-open the file. --- Regards. Norman |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
User form- protection and password.
I follwed your instruction ,the user form is still opening after clicking the
Rectangle to which I assignined the user form code "Norman Jones" wrote: Hi Tungana, =========== How to protect a userform (code + object) by assigning a password?=========== Try password protecting the VBA project: In the VBE, Menus | Tools | VBAProject Properties | Protection | Lock Project for viewing [x] | Enter and confirm Password | OK Save, close and re-open the file. --- Regards. Norman |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
User form- protection and password.
Hi Tungana,
I misunderstood; I assumed that you wished to prevent access to the Userform module. Try assigning something like the following code to your rectangle: '========== Sub Rectangle1_Click() Dim Res As String Const PWORD As String = "ABC" '<<==== CHANGE Res = InputBox(Prompt:="Enter password") If Res < PWORD Then MsgBox Prompt:="The password has not " _ & "been recognised!", _ Buttons:=vbCritical, _ Title:="Password" Exit Sub End If 'Your code to open theUserform, e.g.: Userform1 , Show End Sub '<<========== --- Regards. Norman "TUNGANA KURMA RAJU" wrote in message ... I follwed your instruction ,the user form is still opening after clicking the Rectangle to which I assignined the user form code "Norman Jones" wrote: Hi Tungana, =========== How to protect a userform (code + object) by assigning a password?=========== Try password protecting the VBA project: In the VBE, Menus | Tools | VBAProject Properties | Protection | Lock Project for viewing [x] | Enter and confirm Password | OK Save, close and re-open the file. --- Regards. Norman |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
User form- protection and password.
Thank you,Norman Jones,Its working !!!
"Norman Jones" wrote: Hi Tungana, I misunderstood; I assumed that you wished to prevent access to the Userform module. Try assigning something like the following code to your rectangle: '========== Sub Rectangle1_Click() Dim Res As String Const PWORD As String = "ABC" '<<==== CHANGE Res = InputBox(Prompt:="Enter password") If Res < PWORD Then MsgBox Prompt:="The password has not " _ & "been recognised!", _ Buttons:=vbCritical, _ Title:="Password" Exit Sub End If 'Your code to open theUserform, e.g.: Userform1 , Show End Sub '<<========== --- Regards. Norman "TUNGANA KURMA RAJU" wrote in message ... I follwed your instruction ,the user form is still opening after clicking the Rectangle to which I assignined the user form code "Norman Jones" wrote: Hi Tungana, =========== How to protect a userform (code + object) by assigning a password?=========== Try password protecting the VBA project: In the VBE, Menus | Tools | VBAProject Properties | Protection | Lock Project for viewing [x] | Enter and confirm Password | OK Save, close and re-open the file. --- Regards. Norman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Data Protection- AKA: Sheet/Macro Password Protection | Setting up and Configuration of Excel | |||
Date field in user form & Loading a user form on opening workbook | Excel Programming | |||
Password protection excel document - last user setting lost | Excel Discussion (Misc queries) | |||
Protection password iin VBA, how to avoid user seeing it? | Excel Discussion (Misc queries) | |||
Password protection for an individual form | Excel Programming |