I need to be able to referecne ofjects from my forms in my functions.

This is my Function

Function fncLogin(ByRef Sender As Object, ByVal e As System.EventArgs)
Dim EmployeeName As Login
EmployeeName = CType(Sender, Login)
If EmployeeName.TextBox1.Text = "" Then
MsgBox("You must enter a username!", vbExclamation)
EmployeeName.TextBox2.Focus()
Exit Function
End If
If EmployeeName.TextBox2.Text = "" Then
MsgBox("You must enter a password!", vbExclamation)
EmployeeName.TextBox2.Focus()
Exit Function
End If
End Function

When I try to call this function with this.
fncLogin()

It is underlined.

What am I doing wrong?

Thanks!