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

Draw Sequence Modal of RDO? Explain.

2067


What is instantiating?

2203


What are some methods you can use to send data from one VB executable to another one?

2247


How do I use GetPrivateProfileString to read from INI files?

1429


What is the default model of the form?

2137


What is the use of OLE?

2498


What is the use of Tabledef?

2022


Explain OLE Drag and Drop?

2470


How do I make a text box not beep but do something else when I hit the Enter key?

1541


OLE is used for _______

1608


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

1769


Explain the working with task in Gantt chart view.

1061


What is the difference between change event in normal combobox and dbcombobox?

2329


What do you mean by provider?

1922


what is the Difference between Dynaset and Snapshot?

2040