input box
-
as inputbox is for inputting strings so can i use it to input integer data as well and how can i do it.if anyone has solution plz reply.
You can force a textbox to take ints only by handling the char event, and using char.IsDigit to set HAndled to true for non numbers. Christian Graus - Microsoft MVP - C++
-
as inputbox is for inputting strings so can i use it to input integer data as well and how can i do it.if anyone has solution plz reply.
if you mean how to get an interger out of it than it's really basic: a = int(inputbox("Enter number")) if you rather want to know how to validate and check against an integer than it's a different story. AFAIK you can't do it with an inputbox but you can accomplish it through a textbox in a form as stated in the reaply before (and maybe have a look at the "validate" function).
-
as inputbox is for inputting strings so can i use it to input integer data as well and how can i do it.if anyone has solution plz reply.
You cannot do that to an InputBox since it runs modally. You have two options: 1)Design your own frmInputBox and run it modally to get the input. 2)Just get the input value as strting, then use the
Val()
function to convert the input value to number and check if it really was a number.