i have one form that read user input it will assign to a public variable, here is the code
i have set the variable as this :Code:ElseIf IsNumeric(txt1.Text) = True And IsNumeric(txt2.Text) = True And IsNumeric(txt3.Text) = True Then Main.text1 = CInt(txt1.Text) Main.text1 = CInt(txt2.Text) Main.text1 = CInt(txt3.Text) Main.Access = 1 Main.Custom = 1 Me.Close() Main.Show() End If
the problem is when iam call at a functionCode:Public text1 As Integer Public text2 As Integer Public text3 As Integer
the integer which set in "text1,text2,text3" changed into hex? while i need it in integer ;(Code:test = (ascode * Main.text1) test = (ascode / Main.text2) test = (ascode - Main.text3)
here is the value when called in that function
i even have tried convert it back to integerCode:Main.text1 = &H28 Main.text2 = &H5 Main.text3 = &H3C
same always got hex? codeCode:test = (ascode * cint(Main.text1)) test = (ascode / cint(Main.text2)) test = (ascode - cint(Main.text3))
also trying this
End IfCode:ElseIf IsNumeric(txt1.Text) = True And IsNumeric(txt2.Text) = True And IsNumeric(txt3.Text) = True Then Main.text1 = CInt(txt1.Text.ToString) Main.text1 = CInt(txt2.Text.ToString) Main.text1 = CInt(txt3.Text.ToString) Main.Access = 1 Main.Custom = 1 Me.Close() Main.Show()
how to fix this?? any help appreciated , thx for reading this question




Reply With Quote