Home | Advertising Info5 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Thursday, January 16, 2025  


VBscript Constants




A constant is a meaningful name that takes the place of a number or string and never changes. VBScript defines a number of intrinsic constants.

String Constants

The following string constants can be used anywhere in your code in place of actual values:

Constant Value Description
vbCr Chr(13) Carriage return
vbCrLf Chr(13) & Chr(10) Carriage return–linefeed combination
vbFormFeed Chr(10) Form feed; not useful in Microsoft Windows
vbLf Chr(10) Line feed
vbNewLine Chr(13) & Chr(10) or Chr(10) Platform-specific newline character; whatever is appropriate for the platform
vbNullChar Chr(0) Character having the value 0
vbNullString String having value 0 Not the same a zero-length string (""); used for calling external procedures
vbTab Chr(9) Horizontal tab
vbVerticalTab Chr(11) Vertical tab; not useful in Microsoft Windows

Color Constants

The following color constants can be used anywhere in your code in place of actual values:
Constant Value Description
vbBlack &h00 Black
vbRed &hFF Red
vbGreen &hFF00 Green
vbYellow &hFFFF Yellow
vbBlue &hFF0000 Blue
vbMagenta &hFF00FF Magenta
vbCyan &hFFFF00 Red
vbWhite &hFFFFFF White

Comparison Constants

The following comparison constants can be used anywhere in your code in place of actual values:
Constant Value Description
vbBinaryCompare 0 Perform a binary comparison.
vbTextCompare 1 Perform a textual comparison.
vbDatabaseCompare 2 Perform a comparison based upon information contained in the database where the comparison is to be performed.

Date and Time Constants

The following date and time constants can be used anywhere in your code in place of actual values:
Constant Value Description
vbSunday 1 Sunday
vbMonday 2 Monday
vbTuesday 3 Tuesday
vbWednesday 4 Wednesday
vbThursday 5 Thursday
vbFriday 6 Friday
vbSaturday 7 Saturday
vbFirstJan1 1 Use the week in which January 1 occurs (default).
vbFirstFourDays 2 Use the first week that has at least four days in the new year.
vbFirstFullWeek 3 Use the first full week of the year.
vbUseSystem 0 Use the date format contained in the regional settings for your computer.
vbUseSystemDayOfWeek 0 Use the day of the week specified in your system settings for the first day of the week.

Date Format Constants

The following date format constants can be used anywhere in your code in place of actual values:
Constant Value Description
vbGeneralDate 0 Display a date and/or time. For real numbers, display a data and time. If there is no fractional part, display only a date. If there is no integer part, display time only. Date and time display is determined by your system settings.
vbLongDate 1 Display a date using the long date format specified in your computer's regional settings.
vbShortDate 2 Display a date using the short date format specified in your computer's regional settings.
vbLongTime 3 Display a time using the long time format specified in your computer's regional settings.
vbShortTime 4 Display a time using the short time format specified in your computer's regional settings.

File Input/Output Constants

The following file input/output constants can be used anywhere in your code in place of actual values:
Constant Value Description
ForReading 1 Open a file for reading only. No writing to this file can take place.
ForWriting 2 Open a file for writing. If a file with the same name exists, its previous contents are overwritten.
ForAppending 8 Open a file and write to the end of the file.

VarType Constants

The following VarType constants can be used anywhere in your code in place of actual values:
Constant Value Description
vbEmpty    0 Uninitialized (Default)
vbNull    1 Contains no valid data
vbInteger    2 Integer subtype
vbLong    3 Long subtype
vbSingle    4 Single subtype
vbDouble    5 Double subtype
vbCurrency    6 Currency subtype
vbDate    7 Date subtype
vbString    8 String subtype
vbObject    9 Object
vbError   10 Error subtype
vbBoolean   11 Boolean subtype
vbVariant   12 Variant (used only for arrays of variants)
vbDataObject   13 Data access object
vbDecimal   14 Decimal subtype
vbByte   17 Byte subtype
vbArray 8192 Array

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2025 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages help tutorial how to ASP Help ASP Tutorials ASP Programming ASP Code - ASP Free CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com