VB Language
Comments
A comment is text in a VBA program that is ignored and has no effect on the program operation. You can (and should) use comments to document how the code works, provide details about procedure arguments, and add reminders to yourself or another programmer.
- Read more about Comments
- Log in or register to post comments
Comparison Operators
The comparison operators are used to perform comparisons between expressions. A comparison expression is actually a logical expression, evaluating to True or False depending on the data and operator used.
= Equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
<> Not equal to
- Read more about Comparison Operators
- Log in or register to post comments
Cos()
Calculates the cosine of a specified angle. It returns a double value.
- Read more about Cos()
- Log in or register to post comments
CSng()
This function will change a number into a single type. A single type has 4 decimals so any decimals larger than 4 will be rounded to 4.
- Read more about CSng()
- Log in or register to post comments
CStr()
The CStr() will convert numeric and date values to a string format.
- Read more about CStr()
- Log in or register to post comments
Currency
Name: Currency
Type: Floating Point
Range: -9.22 × 1011 to 9.22 × 1011 approximately
Precision: 4 digits
- Read more about Currency
- Log in or register to post comments
Date
The term date is used to refer to both dates and times. Dates are represented numerically as floating-point numbers. The integer part of the number represents the date as the number of days since December 30, 1899 (with negative numbers for prior dates), and the fractional part of the number represents the time of day as a fraction of the 24-hour day.
- Read more about Date
- Log in or register to post comments
Date()
Returns the system date (no time information).
- Read more about Date()
- Log in or register to post comments
DateDiff()
Syntax: DateDiff(Interval as String, Date1 as Date, Date2 as Date, Optional DayOfWeek, Optional WeekOfYear) as Long
Parameters:
Interval - There are 10 different types of intervals. Depending on the interval the DateDiff() well return the number of units in the Interval. Below is a list of the 10 items. In the script below I used constants to better define them.
Parameter |
DateSerial()
Brian Element
Syntax: DateSerial(Year as integer, Month as integer, Day as integer) The DateSerial function creates a Date value from separate month, day, and year values.
|