• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help with Userform

Fred Wayne

Member
Hello, I have made a sketch workbook in excel. I created a simple login userform. There is an image on the sheet called "QUESTIONAIRE", when you click on the image, the login userform will pop op. And there is another userform called Test1. You need to type an Username and a Password and then click on "Enter", I need that after you click on "Enter", the userform called "Test1" to be displayed. I have tried by different ways and it has been difficult to me. Is there a code or a way to do that. The default Username and Password is 8888(on both, after that I will change it). Please accept my deepest thank you's from now. You are all the best.
 

Attachments

  • log in.PNG
    log in.PNG
    49.7 KB · Views: 7
  • log in2.PNG
    log in2.PNG
    26.8 KB · Views: 7
  • log in3.PNG
    log in3.PNG
    25.5 KB · Views: 6
  • Fred's Final Survey..xlsm
    94.1 KB · Views: 12
Change If Trim(txtUser.Text) = "8888" section to something like below.
Code:
If Trim(txtUser.Text) = "8888" And Trim(txtContra.Text) = "8888" Then
    MsgBox ("Access is Granted"), vbInformation, "Ok"
    Application.Visible = True
    Unload Me
    Test1.Show
Else
    MsgBox ("The entered credentials are incorrect, Tray Again"), vbExclamation, "Alerta"
End If

Then also change Private Sub btnCan_Click() to...
Code:
Private Sub btnCan_Click()
Unload Me
End Sub
 
Back
Top