Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Password userform activate
anyone please can you tell me how to use the userform4 with the password
i've created a userform called userform4 i have a label1 "password" textbox1 for the user to type the password in Commandbutton1 is OK - if password (7496) is correct then take me to Banking Sheet - if wrong password then message box says Sorry please re-enter the correct password. Commandbutton2 is Cancel - this should return to main menu just please show me how this works Thank you -- please can you help... its urgent |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Password userform activate
Hi Moh
try this '--------------------------------------- Private Sub CommandButton1_Click() If Me.TextBox1.Value = 7496 Then Worksheets("Banking Sheet").Activate Else MsgBox "Wrong Password" Me.TextBox1 = "" End If End Sub '--------------------------------------- Private Sub CommandButton2_Click() Unload Me End Sub '--------------------------------------- hope that helps Carlo On Dec 14, 5:26 pm, Moh wrote: anyone please can you tell me how to use the userform4 with the password i've created a userform called userform4 i have a label1 "password" textbox1 for the user to type the password in Commandbutton1 is OK - if password (7496) is correct then take me to Banking Sheet - if wrong password then message box says Sorry please re-enter the correct password. Commandbutton2 is Cancel - this should return to main menu just please show me how this works Thank you -- please can you help... its urgent |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Password userform activate
carlo that worked many thanks 1 last thing please.....
say if i create a new worksheet (called users) column A is list of users column B is list of passwords Again using Userform4 textbox1 is for username textbox2 is for passwords commandbutton1 is for OK - takes me to the banking sheet if correct username and password commandbutton2 is for Cancel - takes me to the main menu worksheet. can you write out a code for this pls -- please can you help... its urgent "carlo" wrote: Hi Moh try this '--------------------------------------- Private Sub CommandButton1_Click() If Me.TextBox1.Value = 7496 Then Worksheets("Banking Sheet").Activate Else MsgBox "Wrong Password" Me.TextBox1 = "" End If End Sub '--------------------------------------- Private Sub CommandButton2_Click() Unload Me End Sub '--------------------------------------- hope that helps Carlo On Dec 14, 5:26 pm, Moh wrote: anyone please can you tell me how to use the userform4 with the password i've created a userform called userform4 i have a label1 "password" textbox1 for the user to type the password in Commandbutton1 is OK - if password (7496) is correct then take me to Banking Sheet - if wrong password then message box says Sorry please re-enter the correct password. Commandbutton2 is Cancel - this should return to main menu just please show me how this works Thank you -- please can you help... its urgent |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Password protected userform | Excel Discussion (Misc queries) | |||
Userform password to show "xxxxxx" in the text box | Excel Discussion (Misc queries) | |||
UserForm Password | Excel Discussion (Misc queries) | |||
Password Userform help !!!! | Excel Discussion (Misc queries) | |||
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. | Excel Worksheet Functions |