Re: Avoid Overflow!

Tech-Archive recommends: Fix windows errors by optimizing your registry




"Arpan" <arpan_de@xxxxxxxxxxx> wrote in message
news:1128993350.589501.267970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I have another query pertaining to this - my VB application lets users
> do a lot of calculations. Often the end result may turn out to be a
> very big number. Under such circumstances, it happens that the number
> is displayed to the user in the exponential form. For e.g.
> 282748441902441558837890625 will be displayed as 2.82748441902442E+26.
> How do I make VB display the number as it is & not in the exponential
> form?


This really isn't related to the subject of your original post and therefore
should have been a new post with a new subject.

Look up the Format function (and be sure to click on the See Also link for
additional topics). You can use it to format the display of pretty much
anything you want in any way you want. In the case of very large or small
numbers, VB defaults to displaying it using scientific notation. If that's
not what you want, you need to write code to format the number otherwise.

This kind of goes along with what I said before about not letting VB coerce
data types. VB will also display things in certain ways that may not be
desirable. You have to control that yourself, just like you have to (or
should) control converting from one data type to another. VB does these
things for you to make the language easier to use. But that doesn't mean
it's better, and usually it doesn't give you exactly what you want. To get
what you want, you have to write the code to do it.

--
Mike
Microsoft MVP Visual Basic


.



Relevant Pages

  • Re: Tapble top fusion generator
    ... >increased my monitor format to 1280x1024 and display it on a Mitsubishi ... >using a screen format less than 1280x1024 and the low -resolution LCD ... >Since the poster writing about the character overlap, ... is, when you make one web site viewable, you can render others ...
    (sci.physics.fusion)
  • 2 Ques regarding dates (matching and subtracting)
    ... The end-user enters a date in cell a2, validated to format DD/MM/YYYY. ... In K30, I want to display the number of days until the end of the month, ... "Jacob" wrote: ... > I want to use a subtraction or matching formula. ...
    (microsoft.public.excel.misc)
  • Re: Dividing hours
    ... you can display these in a format that mimics time by making use of the ... The divisional manager will enter in the annual planned hrs on the ... worksheets Each workbook also has a calculation worksheet. ...
    (microsoft.public.excel.misc)
  • Re: Create Dynamic Controls and Displaying Page by Page on the for
    ... My computer is client and other is server. ... I want to display all recevied values for parameters ... > I'm saying this because dynamically creating a few thousand controls might ... >> row data format will be same. ...
    (microsoft.public.vsnet.general)
  • Re: Create Dynamic Controls and Displaying Page by Page on the for
    ... My computer is client and other is server. ... I want to display all recevied values for parameters ... > I'm saying this because dynamically creating a few thousand controls might ... >> row data format will be same. ...
    (microsoft.public.dotnet.general)