-
msgbox question
I have this code
While (accountsfile.Peek() > -1)
account = accountsfile.ReadLine()
position = InStr(account, " ")
id = Microsoft.VisualBasic.Left(account, position - 1)
password = Mid(account, position + 1)
If mskAccount.ClipText = id AndAlso txtPassword.Text = password Then
grporderform.Visible = True
Exit While
Else
MsgBox("Account or Password is incorrect. Try again.")
mskAccount.Focus()
End If
End While
when executed, what it should do is check if both the id and passowrd submitted are correct, and if so, it will continue with the program. otherwise, it should show a msgbox stating that the user didn't input the right id or password.
one of the problems with the coding i have is that when i get the id or password wrong, the msgbox will show up, and when i click it, it will show up again. this happens 4 times.
another problem is that when i do get the right id and password. the msgbox will still show up, and i will have to click it again twice.
-
While (accountsfile.Peek() > -1)
account = accountsfile.ReadLine()
position = InStr(account, " ")
id = Microsoft.VisualBasic.Left(account, position - 1)
password = Mid(account, position + 1)
If mskAccount.ClipText = id AndAlso txtPassword.Text = password Then
grporderform.Visible = True
Exit While
End If
End While
If grporderform.Visible = False Then
MsgBox("Account or Password is incorrect. Try again.")
mskAccount.Focus()
End If
-
THANK YOU! THANK YOU! THANK YOU!
i can really use your help with other things...
-
I wish I could... I'm not that good with .Net... :(