I'm fairly new to VB and just dug out the old disc so sorry if this is in the wrong place or if it's actually a very simple answer..

I'm trying to do an extremely simple login form that doesn't use any other database but i wouldnt mind using a text file, at the moment i'm using this code but it's saying arguement not optional whenever i click the button.

Code:
'Global Variables
Dim Username As String                       'Username Variable
Dim Password As String                       'Password Variable
 
Private Sub cmdLogin_Click()
 
Username = "Test"              'What the Username Variable is
Password = "Test"              'What the Password Variable is
 
'If Statement Starting Here
'It States that if the username is = to text box and password is = password text box, then it should login, else display error message!
If Username = txtUsername And Password = txtPassword Then
 
           frmLoginSuccess.Show    'Shows the Login Success Form
           frmLoginScreen.Hide       'Hides the Login Screen
 
Else
 
'A Message box that displays you have entered the wrong username and password
           
    MsgBox ("You have entered the wrong username and password")
 
End If
 
End Sub
I've found the code on the internet...