Here is my scrpit,, when I try debugging it it keeps doing something stupid saying Conversion from string "" to type 'Double' is not valid. I will make the line it's refering to bold...
All that I have under the visual part are two buttons, one to set the password, and another to input it...
I'm trying to make it exit the MSGBOX and return to the INPUTBOX and loop, so that you have to put a value in for it, or it won't continue, SOMEONE PLZ help me (and if you attempt to explain it to me please try to explain it to me from scratch, because I have no clue what I'm doing and I'm new at this.)
THANX ALOT TO ANYONE WHO TRYS HELPING ME!!
Code:
Public Class Form1
Dim X As String
Dim Password, PWord
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
X = InputBox("Please SET your PASSWORD for this application.")
If X = vbCancel Then MsgBox("YOU HAVE TO SET A PASSWORD!")
Do Until X = vbOKOnly
X = InputBox("Please SET your PASSWORD for this application.")
[B] If X = vbCancel Then [/B] MsgBox("YOU HAVE TO SET A PASSWORD!")
If X = vbOKOnly Then Show(Me)
Loop
End Sub
Dim R As String
Dim Z As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
X = InputBox("Please SET your PASSWORD for this application.")
If X = vbCancel Then Exit Sub
X = Chr(62)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
R = InputBox("Please Enter your Password")
If R = X Then MsgBox("You are cleared for entry!")
If R <> X Then MsgBox("Sorry WRONG Password, Nice Try...")
End Sub
End Class
All that I have under the visual part are two buttons, one to set the password, and another to input it...
I'm trying to make it exit the MSGBOX and return to the INPUTBOX and loop, so that you have to put a value in for it, or it won't continue, SOMEONE PLZ help me (and if you attempt to explain it to me please try to explain it to me from scratch, because I have no clue what I'm doing and I'm new at this.)
THANX ALOT TO ANYONE WHO TRYS HELPING ME!!
Comment