Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Moh Moh is offline
external usenet poster
 
Posts: 58
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Moh Moh is offline
external usenet poster
 
Posts: 58
Default 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
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 protected userform AOU Excel Discussion (Misc queries) 4 September 15th 07 04:48 PM
Userform password to show "xxxxxx" in the text box Ola2B Excel Discussion (Misc queries) 7 March 15th 07 02:52 PM
UserForm Password Ola2B Excel Discussion (Misc queries) 1 February 28th 07 02:25 PM
Password Userform help !!!! K1KKKA Excel Discussion (Misc queries) 4 January 10th 07 03:09 PM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Excel Worksheet Functions 0 June 23rd 05 11:56 PM


All times are GMT +1. The time now is 02:02 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"