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?

Answers were Sorted based on User's Feedback



Can we display only integers / numbers through the message box? Is there any constraint to do so?..

Answer / karan munjal

Yes, we can
msgbox(value)

Is This Answer Correct ?    7 Yes 2 No

Can we display only integers / numbers through the message box? Is there any constraint to do so?..

Answer / mirza arif nadeem

yes we can display only the integers through the message box.
if isnumeric(<value>) then
msgbox value
end if

Is This Answer Correct ?    5 Yes 3 No

Can we display only integers / numbers through the message box? Is there any constraint to do so?..

Answer / vijju

we can display any thing in messagebox. but, what we r
going to display can be converted into string.

ex:messagebox.show(xxxx.tostring());

Is This Answer Correct ?    6 Yes 5 No

Can we display only integers / numbers through the message box? Is there any constraint to do so?..

Answer / sachin

Message box can display both integer and string like we can
give
Msgbox 5
Msgbox "5". But really there is an issue with VB's message
box for the length. It can only display limited text. What
I mean is

If we concatenate a string to a very large string in a loop
(for eg selected items in a listview,grid etc) then if we
put this string in a message box like

msgbox strSelection . Then you will notice that half of
your string will be missing. So same will happen with
number but it doesn't make sense we ever having a large
number like that !

Is This Answer Correct ?    3 Yes 2 No

Can we display only integers / numbers through the message box? Is there any constraint to do so?..

Answer / abhishek saurabh

Dim value As Integer
value = 10
MessageBox.Show(value)

Is This Answer Correct ?    1 Yes 2 No

Can we display only integers / numbers through the message box? Is there any constraint to do so?..

Answer / 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

Can we display only integers / numbers through the message box? Is there any constraint to do so?..

Answer / soundar

yes,
msgbox(2)

Is This Answer Correct ?    0 Yes 3 No

Can we display only integers / numbers through the message box? Is there any constraint to do so?..

Answer / laxmi

dim xx as integer
xx=123

if val(xx) then exit sub

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More Visual Basic Interview Questions

___,_____ and ____ container objects. ___ Property is to compress a image in image control. ___,___ and __ are difference between image and picture controls. To set the command button for ESC ___ Property has to be changed. ___,__,___ are the type of combo box? __ no of controls in form. OLE is used for _______ ___ is the control used to call a windows application. Clear property is available in ____,___ control. ___ Property is used to count no. of items in a combobox. ___ is a property to resize a label control according to your caption. ___ property is used to change to ___ value to access a identity column'in datacontrols. _____ is the property to ___,____,____ are valid for recordsource property of dat control. Timer control contains ________ no. of events. ____ property is used to lock a textbox to enter a datas. ____ is the difference between Listindex and Tab index. ____ property of menu cannot be set at run time. _____ collection in recordset used to assign a value from textbox to table columns without making abinding in datacontrol. ___ argument can be used to make a menuitem into bold. ___,___ arguments will be used to run a executable program in shell function ___ property used to add a menus at runtime. ___ VB constant make the menu item in centre. ___ method used to move a recordset pointer in nth position in DAG.

1 Answers   TCS,


What is the difference between a Property Let and Property Set procedure?

1 Answers  


How to use advanced data-bound controls.

0 Answers  


How much gain in performance will I get if I write my number crunching routines in C instead of Visual Basic?

0 Answers  


How to test the AX stat class?

0 Answers  


What is the difference between Msgbox Statement and MsgboxQ function?

1 Answers  


How do I access C style strings?

0 Answers  


What is meant by building a recordset.

0 Answers  


What is datagrid in vb net?

0 Answers  


Where can I get good up-to-date information about VB?

0 Answers  


Describe Database Connection pooling relative to MTS ?

1 Answers  


If we can make more than one MDI Form in VB then How? I need to make 2 MDI Forms in my project.

2 Answers   HST, Infosys,


Categories