• 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


  • 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

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.



Excel Ninja
Change If Trim(txtUser.Text) = "8888" section to something like below.
If Trim(txtUser.Text) = "8888" And Trim(txtContra.Text) = "8888" Then
    MsgBox ("Access is Granted"), vbInformation, "Ok"
    Application.Visible = True
    Unload Me
    MsgBox ("The entered credentials are incorrect, Tray Again"), vbExclamation, "Alerta"
End If
Then also change Private Sub btnCan_Click() to...
Private Sub btnCan_Click()
Unload Me
End Sub