Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
VisualBasic Script
Math Functions 27 codes
Home
VisualBasic Script
Math Functions
1 Abs() Returns the absolute value of a number
2 Abs(number) returns The absolute value of number-the unsigned magnitude of the number
3 Atn() Returns the arctangent of a number (radians)
4 Atn(number) returns The arctangent of number in radians
5 Cos() Returns the cosine of a number (radians)
6 Cos(number) returns The cosine of angle number
7 Displaying the integer part of a number
8 Exp() Returns the base e exponential of a number
9 Exp(number) returns e, the base of natural logarithms, raised to the power of number
10 Fix() Returns the integer portion of a number
11 Fix(-3 14159) returns -3
12 Fix(number) returns The integer portion of number (without rounding) If number is negative, returns the negative number gre
13 Log() Returns the natural logarithm of a number
14 Log(number) returns The natural logarithm of number
15 Rnd() Returns a random number between 0 and 1
16 Rnd([number]) returns A random number (with no argument) or a number based on the given initial seed
17 Sgn() Returns the sign of a number
18 Sgn(0) returns 0
19 Sgn(-7) returns -1
20 Sgn(number) returns -1 if number is negative, 0 if number is 0, 1 if number is positive
21 Sin() Returns the sine of a number (radians)
22 Sin(number) returns The sine of the angle specified by number (measured in radians)
23 Sqr() Returns the square root of a number
24 Sqr(number) returns The square root of number If number is negative, VBA gives a runtime error
25 Tan() Returns the tangent of a number (radians)
26 Tan(number) returns The tangent of the angle specified by number (measured in radians)
27 To prevent repetitive sequences, use the Randomize statement to initialize the random number generator with a seed value ba