Can we display only integers / numbers through the message
box? Is there any constraint to do so?
Answer Posted / hemal1972
yes, we can display only integers/numbers through the
message box. following is the code.
'code starts here
'declaring variable which holds integer number.
dim intA as integer
'declaring variable which holds string value
dim strB as string
'now, if we have textbox control in which we enter the
value of any number which may or may not be integer.
intA=cint(val(text1.text))'text1 is name of textbox
control.
strB= cstr(intA)
msgbox strB,vbokonly,"here is integer number"
'code ends here.
paste this code in command1_click event in the form which
contains textbox control text1 and commandbutton control
command1.run the program. enter any number in textbox,
click command1 and see the result in message box. thanks.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How would you create properties by using class Builder Wizard?
Difference between Linked Object and Embedded Object?
Why API functions are Required?
Explain about form creation in Visual Basic?
What is the use of ActiveX Documents?
How about Access 2.0 compatibility?
_____ collection in recordset used to assign a value from textbox to table columns without making abinding in datacontrol.
What is "Reserved Error -1209"?
Is it possible to Manipulate data through flexgrid? Explain.
Is it possible to set a shortcut key for label?
What is snapshot in vb?
Differentiate between DAO,ADO and Adodc as in data access objects?
How can you Navigate from the DHTML application to another DHTML application? .
What is the use of Imagelist Controls ?
Explain the working of templates?