hey guys if i have a inputbox input1 = inputbox("pop") how do i use that value eg like if input1 = (something) then something else i keep on getting a error
Code: Private Sub Form_Load() in1 = InputBox("how are you", "good or bad", , 500, 500) If in1 = "good" Then MsgBox "thats great" Else MsgBox "not so great" End If End Sub all i want is to be able to is read the value in in1 (inputbox1)
Code: Private Sub Form_Load() in1 = InputBox("how are you", "good or bad", , 500, 500) If in1 = "good" Then MsgBox "thats great" Else MsgBox "not so great" End If End Sub all i want is to be able to is read the value in in1 (inputbox1) plz tH4ñx
OK, Assuming your using VB6 and a standard vanilla windows executable (you've pasted a Form_Load so I'm guessing it is) the only error that would produce is a syntax error stating in1 is undefined. add: Dim in1 as string as the first line after the function declaration and you should be fine. Its all down to the fact that option explicit will be declared (which you should really always have.)
thank you guys i can't belive it is as easy as a dim statment you guys rock i got 95% for my test now you rock