Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How would you create properties by using class Builder Wizard?

2659


Difference between Linked Object and Embedded Object?

2329


Why API functions are Required?

2299


Explain about form creation in Visual Basic?

1340


What is the use of ActiveX Documents?

2503


How about Access 2.0 compatibility?

1492


_____ collection in recordset used to assign a value from textbox to table columns without making abinding in datacontrol.

1808


What is "Reserved Error -1209"?

2147


Is it possible to Manipulate data through flexgrid? Explain.

2045


Is it possible to set a shortcut key for label?

1945


What is snapshot in vb?

1009


Differentiate between DAO,ADO and Adodc as in data access objects?

6903


How can you Navigate from the DHTML application to another DHTML application? .

1920


What is the use of Imagelist Controls ?

2188


Explain the working of templates?

1081