Hi,
I tried a macro below and I got error message : Run-time error "424": Object required.
The macro is trying to verify the user name and password from user to input through a userform.
I used Excel 2003 with window XP.
This is part of the macro that got error: (highlighted & italic)
And the error highlight the line : If Len(txtUser.Text) > 0 And Len(txtPass.Text) > 0 Then
I also tried to change the sheet tab name in excel, put variables in the maccro, but it didn't work.
Could someone please help this? Thank you very much.
BJ
I tried a macro below and I got error message : Run-time error "424": Object required.
The macro is trying to verify the user name and password from user to input through a userform.
I used Excel 2003 with window XP.
This is part of the macro that got error: (highlighted & italic)
Rich (BB code):
Private Sub btnOK_Click()
Dim bError As Boolean
Dim sSName As String
Dim p As DocumentProperty
Dim bSetIt As Boolean
bOK2Use = False
bError = True
If Len(txtUser.Text) > 0 And Len(txtPass.Text) > 0 Then
bError = False
Select Case txtUser.Text
Case "user1"
sSName = "u1sheet"
If txtPass.Text <> "u1pass" Then bError = True
Case "user2"
sSName = "u2sheet"
If txtPass.Text <> "u2pass" Then bError = True
Case Else
bError = True
End Select
End If
And the error highlight the line : If Len(txtUser.Text) > 0 And Len(txtPass.Text) > 0 Then
I also tried to change the sheet tab name in excel, put variables in the maccro, but it didn't work.
Could someone please help this? Thank you very much.
BJ
Last edited by a moderator: