Hi,
I have the following code which checks to see if the user log in on to the system matches the user id enter in a text box.
I have a worksheet which has a command button when clicked should read the userid entered in a textbox on the worksheet called "txtCDSID" and then check whether the person logged in supplied the correct userid.
However when i try to read the value in text box i get the following error "Run Time Error '424' Object required"
Please help
Mo
I have the following code which checks to see if the user log in on to the system matches the user id enter in a text box.
Code:
Public Sub CheckedUserLoggedIn()
Dim strLoggedUser As String
strLoggedUser = (Environ$("Username"))
[b] strUserID = txtCDSID.text [/b]
If strUserID = "" Then
Exit Sub
Else
If UCase(strUserID) = UCase(strLoggedUser) Then
MsgBox "Congratulations, you have permission to use the software"
Else
MsgBox "Sorry, But you do not have permission to use this software, please obtain permission, before trying again"
End If
End If
End Sub
I have a worksheet which has a command button when clicked should read the userid entered in a textbox on the worksheet called "txtCDSID" and then check whether the person logged in supplied the correct userid.
However when i try to read the value in text box i get the following error "Run Time Error '424' Object required"
Please help
Mo