Wednesday, May 25, 2011

Visual Basic Functions



Visual Basic offers a rich assortment of built-in functions.  The on-line help utility will give you information on any or all of these functions and their use.  Some examples are:

            Function       Value Returned

            Abs                 Absolute value of a number

            Asc                 ASCII or ANSI code of a character

            Chr                 Character corresponding to a given ASCII or ANSI code

            Cos                 Cosine of an angle

            Date                Current date as a text string

            Format            Date or number converted to a text string

            Left                 Selected left side of a text string

            Len                 Number of characters in a text string

            Mid                  Selected portion of a text string

            Now                Current time and date

            Right              Selected right end of a text string

            Rnd                Random number

            Sin                  Sine of an angle

            Sqr                  Square root of a number

            Str                   Number converted to a text string

            Time               Current time as a text string

            Timer              Number of seconds elapsed since midnight

            Val                  Numeric value of a given text string





.

No comments:

Post a Comment