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
advantage and disadvantage in visual-basic and ms-access please tell me or send my mail-id
OLE is used for _______
What is a thread pool and how are the threads within a thread pool managed?
Can you create a tabletype of recordset in Jet - connected ODBC dbengine?
Explain the differences between ActiveX Dll and ActiveX Exe?
Why visual basic is used?
How can you Navigate from the DHTML application to another DHTML application? .
Explain Default cursor Type and LockEdits type in RDO?
What is datagrid in vb net?
I have several megabytes of memory. Why do I get an "out of memory" error?
How would you create your application in DHTML?
What are the types of Error? In which areas the Error occurs?
which property of menu cannot be set at run time.
How would you add elements and pictures to listitems in listview control?
What is snapshot in vb?