For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic Syntax > April 2005 > Help with Code please









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Help with Code please
David Suchodola

2005-04-20, 8:59 am

I have recently bought VB6 and am teaching myself. I have programmed a lot in
previous years with (Sharp MZ80K) BASIC and a language on the original PSION
Organiser called OPL so I understand structures sub routines etc etc. I
understand VB and how to create forms and displays but nowhere can I find a
book that will provide me with the exact code to perform calculations for
example.

Like, how do I set a number to show as a decimal with a fixed number of
decimal places? There must be a resource somewhere I can use.

I realise that there is a massive resource on the web for routines/functions
previously written but finding an exact one surely is not particularly time
efficient?

Can anyone point me in the right direction? Thanks.
Larry Serflaten

2005-04-20, 4:01 pm


"David Suchodola" <davesuchodola@nospamf2s.com> wrote
>
> Like, how do I set a number to show as a decimal with a fixed number of
> decimal places? There must be a resource somewhere I can use.
>
> I realise that there is a massive resource on the web for routines/functions
> previously written but finding an exact one surely is not particularly time
> efficient?
>
> Can anyone point me in the right direction? Thanks.


Have you tried using VB's Help file? Show the Index, type in 'numbers'
and see what they offer. If you see something like 'formats' that may be
what you are describing...

LFS


Jeff Johnson [MVP: VB]

2005-04-20, 4:01 pm


"David Suchodola" <davesuchodola@nospamf2s.com> wrote in message
news:9A27A3F5-207D-4818-9B9A-191B09416E01@microsoft.com...

> Like, how do I set a number to show as a decimal with a fixed number of
> decimal places? There must be a resource somewhere I can use.


http://msdn.microsoft.com/library/e....asp?frame=true


Duane Bozarth

2005-04-20, 4:01 pm

David Suchodola wrote:
>

....
> Like, how do I set a number to show as a decimal with a fixed number of
> decimal places? ...


Format$()
Randy Birch

2005-04-20, 8:59 pm

Check out the help file for the FormatNumber function.

--

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
----------------------------------------------------------------------------
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
----------------------------------------------------------------------------



"David Suchodola" <davesuchodola@nospamf2s.com> wrote in message
news:9A27A3F5-207D-4818-9B9A-191B09416E01@microsoft.com...
:I have recently bought VB6 and am teaching myself. I have programmed a lot
in
: previous years with (Sharp MZ80K) BASIC and a language on the original
PSION
: Organiser called OPL so I understand structures sub routines etc etc. I
: understand VB and how to create forms and displays but nowhere can I find
a
: book that will provide me with the exact code to perform calculations for
: example.
:
: Like, how do I set a number to show as a decimal with a fixed number of
: decimal places? There must be a resource somewhere I can use.
:
: I realise that there is a massive resource on the web for
routines/functions
: previously written but finding an exact one surely is not particularly
time
: efficient?
:
: Can anyone point me in the right direction? Thanks.

Rachel

2005-04-25, 4:01 am

The MSDN that came with visual basic is an excellent help too. You click
Help under visual basic development environment. You can also look here:
http://msdn.microsoft.com/

You are looking for a format function so type in Format and it should lead
you to the area of coding numeric formats.

"David Suchodola" wrote:

> I have recently bought VB6 and am teaching myself. I have programmed a lot in
> previous years with (Sharp MZ80K) BASIC and a language on the original PSION
> Organiser called OPL so I understand structures sub routines etc etc. I
> understand VB and how to create forms and displays but nowhere can I find a
> book that will provide me with the exact code to perform calculations for
> example.
>
> Like, how do I set a number to show as a decimal with a fixed number of
> decimal places? There must be a resource somewhere I can use.
>
> I realise that there is a massive resource on the web for routines/functions
> previously written but finding an exact one surely is not particularly time
> efficient?
>
> Can anyone point me in the right direction? Thanks.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com