Sie sind auf Seite 1von 535

DevGuru VBScript Introduction

PDF version ($10)

Quick References
Click on VIEW INDEX for the master index or on any of the section titles
ADO
ASP
CSS2 This Quick Reference is now available for purchase in PDF format for easy off-line viewing
HTML
and printing. Fully indexed for ease of navigation, this is an invaluable resource for all web
JavaScript
developers. Click an icon above to download a free 15 day trial version or to purchase this
Jet SQL
Quick Reference.
VBScript
WML Welcome to the DevGuru VBScript Quick Reference guide. This is an extremely
WMLScript
comprehensive 247 page reference source that explains and gives examples of code, plus
WSH
the resultant output, for all of the constants, functions, methods, properties, objects,
XHTML
operators, and statements that define this language.
XML DOM
XSLT
VBScript, or by its full name, the Microsoft Visual Basic Scripting Edition language, is a
Features simplified version of the Visual Basic and Visual Basic for Applications family of programming
Ask DevGuru languages. It is also considered to be closely related to the BASIC programming language.
ASP Resources
HTML Color Chart VBScript is a scripting language. or more precisely a "scripting environment", which can
Find the Bug enhance HTML Web pages by making them active, as compared to a simple static display.
Knowledge Base Specifically, VBScript was created by Microsoft to use either as a client-side scripting
Links language for the Microsoft Internet Explorer (versions 3.0 and later) or as a server-side
Tips of the Week scripting language with the Microsoft Internet Information Server (versions 3.0 and later). A
T-SQL Syntax Charts primary advantage for using the server-side approach is that the VBScript is processed by
Tutorials
the server before it is transmitted to the client. Therefore, the client only receives an HTML
Products page and we do not have to concern ourselves as to whether the browser can interpret the
dgCalendar VBScript. In contrast, by using the client-side approach, you purposely transfer the work load
dgCharge to the browser in order to reduce the work load of the server. Unfortunately, older or non-
dgChart Microsoft browsers may not be able to correctly interpret and display the transmitted file. In
dgEncrypt addition to this, the source code is exposed to the browser user. On the brighter side, a client-
dgFileUpload side program can produce a more-responsive application, since user input can be processed
dgReport on the client machine, and not sent back to the server for processing.
dgSort
dgTree The true importance of VBScript is that it is the default language of Active Server Pages
Site (ASP).
Authoring
Coming Soon ASP is an exciting technology from Microsoft that is of significant value to developers. ASP
DevGuru Resume extends standard HTML by adding built-in objects and server-side scripting, and by allowing
Errata access to databases and other server-side ActiveX components. All of this means that it is
Link to Us now even easier than ever to make your Web pages as dynamic and enticing as you desire.
Merchandise
Sponsorships For many Web-application developers, VBScript may very well be the most important
Testimonials programming language.

http://www.devguru.com/Technologies/vbscript/quickref/vbscript_intro.html (1 of 2) [29/07/2002 12:22:18]


DevGuru VBScript Introduction

What's New
Partners VBScript Version 5.0 was released in 1999. Certainly, the most important new feature of
Code Project Version 5.0 is the ability to use the Class statement to create your own class objects. Other
DevelopersDex new features of interest include the Timer function, the With statement, and regular
Prog. Heaven expression searching using the RegExp and Match objects.
Tek-Tips Forum
TopXML Recently, Microsoft renamed VBScript Version 5.0 to Version 5.5 to signify that it is part of
VBXML.COM the Windows Script Version 5.5 package. If you wish to download a copy of VBScript Version
VisualBuilder.com 5.5 from Microsoft, click here.
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/vbscript_intro.html (2 of 2) [29/07/2002 12:22:18]


DevGuru VBScript Index

Quick References
ADO ' (comment) Dictionary InputBox Raise
ASP - (minus) DeleteFile InStr Randomize
CSS2 & (concatenate) DeleteFolder InStrRev Read
HTML * (multiply) Description Int ReadAll
JavaScript / (divide) Dim Is ReadLine
Jet SQL \ (integer divide) Do . . . Loop IsArray ReDim
VBScript ^ (exponentiate) Drive IsDate RegExp
WML + (plus) DriveExists IsEmpty Rem
WMLScript < (less-than) DrivesCollection IsNull Remove
WSH <= (less-than or equal) DriveType IsNumeric RemoveAll
XHTML = (equal) Empty IsObject Replace Function
XML DOM > (greater-than) Eqv Items Replace Method
XSLT >= (greater-than or equal) Erase Item RGB
<> (not equal) Err Dictionary Right
Features Drives Collection
Abs Eval Rnd
Ask DevGuru Files Collection
And Execute (method) Round
ASP Resources Folders Collection
Array Execute (statement) RTrim
HTML Color Chart Matches Collection
Asc Exists ScriptEngine
Find the Bug Join
AtEndOfLine Exit ScriptEngineBuildVersion
Knowledge Base Key
AtEndOfStream Exit Property ScriptEngineMajorVersion
Links Key Words
Atn Exp ScriptEngineMinorVersion
Tips of the Week Keys
BuildPath False Second
T-SQL Syntax Charts LBound
Call File Select Case
Tutorials LCase
CBool File Attribute Set
Products CByte FileExists Left SetLocale
dgCalendar CCur File Input/Output Len Sgn
dgCharge CDate FilesCollection Line Sin
dgChart CDbl FileSystemObject LoadPicture Source
dgEncrypt Chr Filter Log Space
dgFileUpload CInt Fix LTrim Split
dgReport CLng Folder Match Sqr
dgSort Class Object FolderExists Matches Collection StrComp
dgTree Class Statement FoldersCollection Mid String (constants)
Color For . . . Each Minute String (function)
Site
Column For . . . Next Mod StrReverse
Authoring
CompareMode FormatCurrency Month Sub
Coming Soon
Comparison FormatDateTime MonthName Tan
DevGuru Resume
Const FormatNumber MoveFile Terminate
Errata
CopyFile FormatPercent MoveFolder TextStream
Link to Us
CopyFolder Function . . . End Function MsgBox (constants) Time
Merchandise
Cos GetAbsolutePathName MsgBox (function) Timer
Sponsorships
Count GetBaseName New TimeSerial
Testimonials
Dictionary GetDriveName Not TimeValue
What's New
Drives Collection GetExtensionName Nothing Trim
Partners Files Collection GetFile Now Tristate
Code Project Folders Collection GetFileName Null True
DevelopersDex Matches Collection GetFolder Number TypeName
Prog. Heaven CreateFolder GetLocale Object Error Constant UBound
Tek-Tips Forum CreateObject GetObject Oct UCase
TopXML CSng GetParentFolderName On Error VarType (constants)
VBXML.COM CStr GetRef OpenAsTextStream VarType (function)
VisualBuilder.com Date GetSpecialFolder OpenTextFile Weekday
W3Schools DateAdd GetTempName Option Explicit WeekdayName
XMLPitstop DateDiff HelpContext Or While . . . Wend
ZVON.org DateFormat Pattern

http://www.devguru.com/Technologies/vbscript/quickref/vbscript_list.html (1 of 2) [29/07/2002 12:22:21]


DevGuru VBScript Index

Search Us! DatePart HelpFile Private With . . . End With


DateSerial Hex Property Get Write
DateTime Hour Property Let WriteBlankLines
DateValue If . . . Then Property Set WriteLine
Day Imp Public Xor
Initialize Year

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/vbscript_list.html (2 of 2) [29/07/2002 12:22:21]


DevGuru VB SCript Functions Index

Quick References
ADO Abs GetLocale RGB
ASP Array GetObject Right
CSS2 Asc GetRef Rnd
HTML Atn Hex Round
JavaScript CBool Hour RTrim
Jet SQL CByte InputBox ScriptEngine
VBScript CCur InStr ScriptEngineBuildVersion
WML CDate InStrRev ScriptEngineMajorVersion
WMLScript CDbl Int ScriptEngineMinorVersion
WSH Chr IsArray Second
XHTML CInt IsDate SetLocale
XML DOM CLng IsEmpty Sgn
XSLT Cos IsNull Sin
CreateObject IsNumeric Space
Features
CSng IsObject Split
Ask DevGuru
CStr Join Sqr
ASP Resources
Date LBound StrComp
HTML Color Chart
DateAdd LCase String
Find the Bug
DateDiff Left StrReverse
Knowledge Base
DatePart Len Tan
Links
DateSerial LoadPicture Time
Tips of the Week
DateValue Log Timer
T-SQL Syntax Charts
Day LTrim TimeSerial
Tutorials
Eval Mid TimeValue
Products Exp Minute Trim
dgCalendar Filter Month UBound
dgCharge Fix MonthName UCase
dgChart FormatCurrency MsgBox VarType
dgEncrypt FormatDateTime Now Weekday
dgFileUpload FormatNumber Oct WeekdayName
dgReport FormatPercent Replace Year
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/functions.html (1 of 2) [29/07/2002 12:22:24]


DevGuru VB SCript Functions Index

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/functions.html (2 of 2) [29/07/2002 12:22:24]


DevGuru VBScript Statements Index

Quick References
ADO Call Private
ASP Class ... End Class Property Get
CSS2 Const Property Let
HTML Dim Property Set
JavaScript Do ... Loop Public
Jet SQL Erase Randomize
VBScript Execute ReDim
WML Exit Rem
WMLScript For ... Next Select Case
WSH For Each ... Next Set
XHTML Function Sub
XML DOM If While
XSLT On Error With ... End With
Option Explicit ' (comment)
Features
Ask DevGuru
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/statements.html (1 of 2) [29/07/2002 12:22:26]


DevGuru VBScript Statements Index

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/statements.html (2 of 2) [29/07/2002 12:22:26]


DevGuru VBScript Operators Index

Quick References
ADO And <= (less-than or equal)
ASP Eqv >= (greater-than or equal)
CSS2 Imp <> (not equal)
HTML Is + (plus)
JavaScript Mod & (concatenate)
Jet SQL Not - (minus)
VBScript Or / (divide)
WML Xor \ (integer divide)
WMLScript = (equal) * (multiply)
WSH < (less-than) ^ (exponentiate)<
XHTML > (greater-than)
XML DOM
XSLT
Features
Ask DevGuru
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/operators.html (1 of 2) [29/07/2002 12:22:28]


DevGuru VBScript Operators Index

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/operators.html (2 of 2) [29/07/2002 12:22:28]


DevGuru VBScript Constants Index

Quick References
ADO Color
ASP Comparison
CSS2 Date Format
HTML Date/Time
JavaScript File Attribute
Jet SQL File Input/Output
VBScript MsgBox
WML Object Error
WMLScript String
WSH Tristate
XHTML VarType
XML DOM
XSLT
Features
Ask DevGuru
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/constants.html (1 of 2) [29/07/2002 12:22:30]


DevGuru VBScript Constants Index

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/constants.html (2 of 2) [29/07/2002 12:22:30]


DevGuru VBSCript Objects Index

Quick References
ADO Class
ASP Dictionary
CSS2 Drive
HTML Drives Collection
JavaScript Err
Jet SQL File
VBScript Files Collection
WML FileSystemObject
WMLScript Folder
WSH Folders Collection
XHTML Match
XML DOM Matches Collection
XSLT RegExp
TextStream
Features
Ask DevGuru
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/objects.html (1 of 2) [29/07/2002 12:22:32]


DevGuru VBSCript Objects Index

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/objects.html (2 of 2) [29/07/2002 12:22:32]


DevGuru VBScript Methods Index

Quick References
ADO Add DriveExists Move
ASP Dictionary Execute File
CSS2 FoldersCollection Exists Folder
HTML BuildPath FileExists MoveFile
JavaScript Close FolderExists MoveFolder
Jet SQL Copy GetAbsolutePathName OpenAsTextStream
File GetBaseName OpenTextFile
VBScript
Folder GetDrive Raise
WML
CopyFolder GetDriveName Remove
WMLScript
CreateFolder GetExtensionName RemoveAll
WSH
CreateTextFile GetFile Read
XHTML
FileSystemObject ReadAll
XML DOM GetFileName
Folder ReadLine
XSLT GetFolder
Delete Replace
GetParentFolderName
Features File
SkipLine
GetSpecialFolder
Ask DevGuru Folder
GetTempName Write
ASP Resources DeleteFile
Items WriteBlankLines
HTML Color Chart DeleteFolder
Keys WriteLine
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials
What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML

http://www.devguru.com/Technologies/vbscript/quickref/methods.html (1 of 2) [29/07/2002 12:22:34]


DevGuru VBScript Methods Index

VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/methods.html (2 of 2) [29/07/2002 12:22:34]


DevGuru VBScript Events Index

Quick References
ADO Initialize
ASP Terminate
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Ask DevGuru
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials
What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML

http://www.devguru.com/Technologies/vbscript/quickref/eventhandler.html (1 of 2) [29/07/2002 12:22:36]


DevGuru VBScript Events Index

VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/eventhandler.html (2 of 2) [29/07/2002 12:22:36]


DevGuru VBScript Properties Index

Quick References
ADO AtEndOfLine Item
ASP AtEndofStream Dictionary
CSS2 Attributes Drives Collection
HTML File Files Collection
JavaScript Folder Folders Collection
Jet SQL Column Matches Collection
VBScript Count Global
Dictionary IgnoreCase
WML
Drives Collection Key
WMLScript
Files Collection Length
WSH
Folders Collection Line
XHTML
Matches Collection Number
XML DOM
FirstIndex Pattern
XSLT
Description Path
Features DriveType Drives Object
Ask DevGuru FirstIndex Files Object
ASP Resources HelpContext Folders Object
HTML Color Chart HelpFile Source
Find the Bug Value
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/properties.html (1 of 2) [29/07/2002 12:22:38]


DevGuru VBScript Properties Index

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/properties.html (2 of 2) [29/07/2002 12:22:38]


DevGuru VBScript Operator: And

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: And
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML And
WMLScript
WSH The And operator is used to perform a logical conjunction on two expressions, where the
XHTML expressions are Null, or are of Boolean subtype and have a value of True or False.
XML DOM
XSLT The And operator can also be used a "bitwise operator" to make a bit-by-bit comparison of two
Features integers. If both bits in the comparison are 1, then a 1 is returned. Otherwise, a 0 is returned.
Ask DevGuru
ASP Resources When using the And to compare Boolean expressions, the order of the expressions is not
HTML Color Chart important.
Find the Bug
Knowledge Base Code:
Links <% =True And True %>
Tips of the Week <% =True And False %>
T-SQL Syntax Charts <% =False And True %>
Tutorials <% =False And False %>
Products <% =True And Null %>
dgCalendar <% =Null And True %>
dgCharge <% =False And Null %>
dgChart <% =Null And False %>
dgEncrypt <% =Null And Null %>
dgFileUpload
dgReport Output:
dgSort True
dgTree False
Site False
Authoring
False
Coming Soon (Null output)
DevGuru Resume (Null output)
Errata False
Link to Us False
Merchandise (Null output)
Sponsorships
Testimonials Code:
<% anyexpression = True %>

http://www.devguru.com/Technologies/vbscript/quickref/and.html (1 of 2) [29/07/2002 12:22:40]


DevGuru VBScript Operator: And

What's New <% someexpression = False %>


Partners <% =anyexpression And someexpression %>
Code Project
DevelopersDex Output:
Prog. Heaven False
Tek-Tips Forum
TopXML In this example, the And performs a bitwise comparison on the 1 (in binary 001) and the 2 (in
VBXML.COM binary 010), and returns a 0 (in binary 000).
VisualBuilder.com
W3Schools Code:
XMLPitstop <%
ZVON.org Expression1 = 1
Search Us!
Expression2 = 2
Result = Expression1 And Expression2
Response.Write "Result = " & Result
%>

Output:
Result = 0

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/and.html (2 of 2) [29/07/2002 12:22:40]


DevGuru VBScript Operators: Eqv

Quick References
ADO Imp Operator
ASP
CSS2
HTML OPERATORS: Eqv
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Eqv
WMLScript
WSH The Eqv operator is used to perform a logical comparison on two exressions (i.e., are the two
XHTML expressions identical), where the expressions are Null, or are of Boolean subtype and have a
XML DOM value of True or False.
XSLT
Features The Eqv operator can also be used a "bitwise operator" to make a bit-by-bit comparison of two
Ask DevGuru integers. If both bits in the comparison are the same (both are 0's or 1's), then a 1 is returned.
ASP Resources Otherwise, a 0 is returned.
HTML Color Chart
Find the Bug The order of the expressions in the comparison is not important.
Knowledge Base
Links Code:
Tips of the Week <% =True Eqv True %>
T-SQL Syntax Charts <% =True Eqv False %>
Tutorials <% =False Eqv True %>
Products <% =False Eqv False %>
dgCalendar
dgCharge Output:
dgChart True
dgEncrypt False
dgFileUpload False
dgReport True
dgSort
dgTree Code:
Site <% Expression1 = True %>
Authoring
<% Expression2 = False %>
Coming Soon <% =Expression1 Eqv Expression2 %>
DevGuru Resume
Errata Output:
Link to Us False
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/eqv.html (1 of 2) [29/07/2002 12:22:42]


DevGuru VBScript Operators: Eqv

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/eqv.html (2 of 2) [29/07/2002 12:22:42]


DevGuru VBScript Operator: Imp

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: Imp
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Imp
WMLScript
WSH The Imp operator is used to perform a logical implication on two expressions, where the
XHTML expressions are Null, or are of Boolean subtype and have a value of True or False.
XML DOM
XSLT The Imp operator can also be used a "bitwise operator" to make a bit-by-bit comparison of two
Features integers. If both bits in the comparison are the same (both are 0's or 1's), then a 1 is returned. If
Ask DevGuru the first bit is a 0 and the second bit is a 1, then a 1 is returned. If the first bit is a 1 and the
ASP Resources second bit is a 0, then a 0 is returned.
HTML Color Chart
Find the Bug The order of the expressions is important.
Knowledge Base
Links Code:
Tips of the Week <% =True Imp True %>
T-SQL Syntax Charts <% =True Imp False %>
Tutorials <% =False Imp True %>
Products <% =False Imp False %>
dgCalendar
dgCharge <% =True Imp Null %>
dgChart <% =Null Imp True %>
dgEncrypt <% =False Imp Null %>
dgFileUpload <% =Null Imp False %>
dgReport <% =Null Imp Null %>
dgSort
dgTree Output:
Site True
Authoring
False
Coming Soon True
DevGuru Resume True
Errata
Link to Us (Null output)
Merchandise True
Sponsorships True
Testimonials (Null output)
(Null output)

http://www.devguru.com/Technologies/vbscript/quickref/Imp.html (1 of 2) [29/07/2002 12:22:43]


DevGuru VBScript Operator: Imp

What's New
Partners Code:
Code Project <% AnyExpression = True %>
DevelopersDex <% SomExpression = False %>
Prog. Heaven <% =AnyExpression Imp SomeExpression %>
Tek-Tips Forum
TopXML Output:
VBXML.COM False
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/Imp.html (2 of 2) [29/07/2002 12:22:43]


DevGuru VBScript Operator: Is

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATORS: Is
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Is
WMLScript
WSH The Is operator is used to determine if two variables refer to the same object.
XHTML The output is either True or False.
XML DOM
XSLT Code:
Features <% Set object1 = Request.ServerVariables("SCRIPT_NAME") %>
Ask DevGuru <% Set object2 = object1 %>
ASP Resources <% =object1 Is object2 %>
HTML Color Chart
Find the Bug Output:
Knowledge Base True
Links
Tips of the Week Code:
T-SQL Syntax Charts <% Set object1 = Server.CreateObject("Scripting.FileSystemObject") %>
Tutorials <% Set object2 = Request.ServerVariables("SCRIPT_NAME") %>
Products <% =object1 Is object2 %>
dgCalendar
dgCharge Output:
dgChart False
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/is.html (1 of 2) [29/07/2002 12:22:46]


DevGuru VBScript Operator: Is

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/is.html (2 of 2) [29/07/2002 12:22:46]


DevGuru VBScript Operator: Mod Operator

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: Mod
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Mod
WMLScript
WSH The Mod operator divides two numbers and returns the remainder.
XHTML
XML DOM In the example, 5 divides into 26, 5 times, with a remainder of 1.
XSLT
Features Code:
Ask DevGuru <% remainder = 26 Mod 5 %>
ASP Resources
HTML Color Chart Output:
Find the Bug 1
Knowledge Base
Links Note that for floating-point numbers, the numbers to the right of the decimal are simply
Tips of the Week ignored (i.e., in the example, 5.7176 is treated as 5 by Mod).
T-SQL Syntax Charts
Tutorials Code:
Products <% remainder = 26.1234 Mod 5.7176 %>
dgCalendar
dgCharge Output:
dgChart 1
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/mod.html (1 of 2) [29/07/2002 12:22:47]


DevGuru VBScript Operator: Mod Operator

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/mod.html (2 of 2) [29/07/2002 12:22:47]


DevGuru VBScript Operator Not

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: Not
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Not
WMLScript
WSH The Not operator is used to perform a logical negation on an expression. The expression must
XHTML be of Boolean subtype and have a value of True or False. This operator causes a True
XML DOM expression to become False, and a False expression to become True.
XSLT
Features The Not operator can also be used a "bitwise operator" to make a bit-by-bit inversion of the
Ask DevGuru binary values of an integer. If the bit is a 1, then a 0 is returned. If the bit is a 0, then a 1 is
ASP Resources returned. Thus, the binary value 101 becomes 010.
HTML Color Chart
Find the Bug Code:
Knowledge Base <% AnyExpression = True %>
Links <% =Not AnyExpression %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials False
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/not.html (1 of 2) [29/07/2002 12:22:49]


DevGuru VBScript Operator Not

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/not.html (2 of 2) [29/07/2002 12:22:49]


DevGuru VBScript Operator: Or

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: Or
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Or
WMLScript
WSH The Or operator is used to perform a logical disjunction on two expressions, where the
XHTML expressions are Null, or are of Boolean subtype and have a value of True or False.
XML DOM
XSLT The Or operator can also be used a "bitwise operator" to make a bit-by-bit comparison of two
Features integers. If one or both bits in the comparison are 1, then a 1 is returned. Otherwise, a 0 is
Ask DevGuru returned.
ASP Resources
HTML Color Chart When using the Or to compare Boolean expressions, the order of the expressions is
Find the Bug important.
Knowledge Base
Links Code:
Tips of the Week <% =True Or True %>
T-SQL Syntax Charts <% =True Or False %>
Tutorials <% =False Or True %>
Products <% =False Or False %>
dgCalendar
dgCharge <% =True Or Null %>
dgChart <% =Null Or True %>
dgEncrypt <% =False Or Null %>
dgFileUpload <% =Null Or False %>
dgReport <% =Null Or Null %>
dgSort
dgTree Output:
Site True
Authoring
True
Coming Soon True
DevGuru Resume False
Errata
Link to Us True
Merchandise True
Sponsorships (Null output)
Testimonials (Null output)
(Null output)

http://www.devguru.com/Technologies/vbscript/quickref/or.html (1 of 2) [29/07/2002 12:22:51]


DevGuru VBScript Operator: Or

What's New
Partners In this example, the Or performs a bitwise comparison on the 1 (in binary 001) and the 2 (in
Code Project binary 010), and returns a 3 (in binary 011).
DevelopersDex
Prog. Heaven Code:
Tek-Tips Forum <%
TopXML Expression1 = 1
VBXML.COM Expression2 = 2
VisualBuilder.com Result = Expression1 Or Expression2
W3Schools Response.Write "Result = " & Result
XMLPitstop %>
ZVON.org
Search Us!
Output:
Result = 3

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/or.html (2 of 2) [29/07/2002 12:22:51]


DevGuru VBScript Operator: Xor

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: Xor
JavaScript
Jet SQL Xor
VBScript
WML The Xor operator is used to perform a logical exclusion on two expressions, where the
WMLScript expressions are Null, or are of Boolean subtype and have a value of True or False.
WSH
XHTML The Xor operator can also be used a "bitwise operator" to make a bit-by-bit comparison of two
XML DOM integers. If both bits are the same in the comparison (both are 0's or 1's), then a 0 is returned.
XSLT Otherwise, a 1 is returned.
Features
Ask DevGuru Code:
ASP Resources <% =True Xor True %>
HTML Color Chart <% =True Xor False %>
Find the Bug <% =False Xor True %>
Knowledge Base <% =False Xor False %>
Links
Tips of the Week Output:
T-SQL Syntax Charts False
Tutorials True
Products True
dgCalendar False
dgCharge
dgChart Code:
dgEncrypt <% expression1 = True %>
dgFileUpload <% expression2 = False %>
dgReport <% =expression1 Xor expression2 %>
dgSort
dgTree Output:
Site True
Authoring
Coming Soon In this example, the Xor performs a bitwise comparison on the 3 (in binary 011) and the 5 (in
DevGuru Resume binary 101), and returns a 6 (in binary 110).
Errata
Link to Us Code:
Merchandise <%
Sponsorships Expression1 = 3
Testimonials Expression2 = 5
Result = Expression1 Xor Expression2

http://www.devguru.com/Technologies/vbscript/quickref/xor.html (1 of 2) [29/07/2002 12:22:54]


DevGuru VBScript Operator: Xor

What's New Response.Write "Result = " & Result


Partners %>
Code Project
DevelopersDex Output:
Prog. Heaven Result = 6
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/xor.html (2 of 2) [29/07/2002 12:22:54]


DevGuru VBScript Operator: =

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: =
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML =
WMLScript
WSH The operator is used to assign a value to a variable, or to compare strings and numbers, or to
XHTML print out the value of a variable.
XML DOM
XSLT When used for assignment, a single variable on the left side of the = operator is given the value
Features determined by one or more variables and/or expressions on the right side.
Ask DevGuru
ASP Resources Code:
HTML Color Chart <% mynumber = 5.0 + 7.9*(444.999 / 456.9) %>
Find the Bug <% mystring = "The moon is 2160 miles in diameter." %>
Knowledge Base <% myvar = xxx + yyy + zzz %>
Links <% myarray(40) = 12345 %>
Tips of the Week
T-SQL Syntax Charts
Tutorials The = operator can also compare two strings or two numbers and see if they are the same. For
Products strings, the comparison is case sensitive.
dgCalendar
dgCharge
Code:
dgChart
<% ="Apple"="Apple" %>
dgEncrypt <% ="aPPle"="ApplE" %>
dgFileUpload
dgReport <% =123=123 %>
dgSort <% =5.67=98.7 %>
dgTree
Output:
Site True
Authoring
False
Coming Soon
DevGuru Resume
True
Errata
False
Link to Us
Merchandise
Sponsorships
When the = operator is used to print out the value of a variable, the statement must be
Testimonials
enclosed by its own set of <% %>. There can blank spaces between the = operator and the

http://www.devguru.com/Technologies/vbscript/quickref/equal.html (1 of 2) [29/07/2002 12:22:56]


DevGuru VBScript Operator: =

What's New variable.


Partners
Code Project Code:
DevelopersDex <% myfish = "Neon tetra" %>
Prog. Heaven <% =myfish %>
Tek-Tips Forum <% = myfish %>
TopXML
VBXML.COM Output:
VisualBuilder.com Neon tetra
W3Schools Neon tetra
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/equal.html (2 of 2) [29/07/2002 12:22:56]


DevGuru VBScript Operator: <

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: <
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML <
WMLScript
WSH The < operator determines if the first expression is less-than the
XHTML second expression.
XML DOM
XSLT Code:
Features <% 123 < 456 %>
Ask DevGuru <% "a" < "A" %>
ASP Resources
HTML Color Chart Output:
Find the Bug True
Knowledge Base False
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/lessthan.html (1 of 2) [29/07/2002 12:22:57]


DevGuru VBScript Operator: <

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/lessthan.html (2 of 2) [29/07/2002 12:22:57]


DevGuru VBScript Operator: >

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: >
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML >
WMLScript
WSH The > operator determines if the first expression is greater-than the
XHTML second expression.
XML DOM
XSLT Code:
Features <% 123 > 456 %>
Ask DevGuru <% "a" > "A" %>
ASP Resources
HTML Color Chart Output:
Find the Bug False
Knowledge Base True
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/greaterthan.html (1 of 2) [29/07/2002 12:22:59]


DevGuru VBScript Operator: >

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/greaterthan.html (2 of 2) [29/07/2002 12:22:59]


DevGuru VBScript Operator: <=

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: <=
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML <=
WMLScript
WSH The <= operator determines if the first expression is less-than-or-equal the
XHTML second expression.
XML DOM
XSLT Code:
Features <% 123 <= 456 %>
Ask DevGuru <% "a" <= "A" %>
ASP Resources
HTML Color Chart Output:
Find the Bug True
Knowledge Base False
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/lteq.html (1 of 2) [29/07/2002 12:23:01]


DevGuru VBScript Operator: <=

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/lteq.html (2 of 2) [29/07/2002 12:23:01]


DevGuru VBScript Operator: >=

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: >=
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML >=
WMLScript
WSH The >= operator determines if the first expression is greater-than-or-equal
XHTML the second expression.
XML DOM
XSLT Code:
Features <% 123 >= 456 %>
Ask DevGuru <% "a" >= "A" %>
ASP Resources
HTML Color Chart Output:
Find the Bug False
Knowledge Base True
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/gteq.html (1 of 2) [29/07/2002 12:23:03]


DevGuru VBScript Operator: >=

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/gteq.html (2 of 2) [29/07/2002 12:23:03]


DevGuru VBScript Operator: <>

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: <>
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML <>
WMLScript
WSH The <> operator is called the not equal or inequality operator.
XHTML
XML DOM Code:
XSLT <%
Features If 128 <> 777 Then
Ask DevGuru Response.Write("Not equal")
ASP Resources End If
HTML Color Chart %>
Find the Bug
Knowledge Base Output:
Links Not equal
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/inequality.html (1 of 2) [29/07/2002 12:23:04]


DevGuru VBScript Operator: <>

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/inequality.html (2 of 2) [29/07/2002 12:23:04]


DevGuru VBScript Operator: +

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: +
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML +
WMLScript
WSH The + operator has two uses. It is used to add numbers together. It also may be used
XHTML to concatenate (combine) strings together.
XML DOM
XSLT Note it is usually recommended that only the & operator be used for string
Features concatenation.
Ask DevGuru
ASP Resources Addition:
HTML Color Chart
Find the Bug Code:
Knowledge Base <% total = 5.678 + 0.234 + 23.1 %>
Links
Tips of the Week Output:
T-SQL Syntax Charts 29.012
Tutorials
Products Concatenation:
dgCalendar
dgCharge Code:
dgChart <% cheese=" is made of blue cheese." %>
dgEncrypt <% sentence="The moon" + cheese + " Mice like blue cheese." %>
dgFileUpload
dgReport Output:
dgSort The moon is made of blue cheese. Mice like blue cheese.
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/plus.html (1 of 2) [29/07/2002 12:23:06]


DevGuru VBScript Operator: +

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/plus.html (2 of 2) [29/07/2002 12:23:06]


DevGuru VBScript Operator: &

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: &
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML &
WMLScript
WSH The & operator is the preferred operator for concatenating strings. However, the +
XHTML operator may also be used for concatenation.
XML DOM
XSLT Code:
Features <% cheese=" is made of blue cheese." %>
Ask DevGuru <% sentence="The moon" & cheese & " Mice like blue cheese." %>
ASP Resources
HTML Color Chart Output:
Find the Bug The moon is made of blue cheese. Mice like blue cheese.
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/ampersand.html (1 of 2) [29/07/2002 12:23:08]


DevGuru VBScript Operator: &

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/ampersand.html (2 of 2) [29/07/2002 12:23:08]


DevGuru VBScript Operator: -

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: -
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML -
WMLScript
WSH The - operator has two uses. It is used for subtracting numbers. It also is used to
XHTML indicated the sign of a number (i.e., -4.5832).
XML DOM
XSLT Code:
Features <% total = 5.678 - 0.234 - 23.1 %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart -17.656
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/minus.html (1 of 2) [29/07/2002 12:23:10]


DevGuru VBScript Operator: -

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/minus.html (2 of 2) [29/07/2002 12:23:10]


DevGuru VBScript Operator: /

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: /
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML /
WMLScript
WSH The / operator divides two numbers and returns a floating-point
XHTML number.
XML DOM
XSLT Code:
Features <% result = 25.0 / 4.975 %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart 5.0251256281407
Find the Bug
Knowledge Base Code:
Links <% result = 25 / 5 %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials 5
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/foreslash.html (1 of 2) [29/07/2002 12:23:11]


DevGuru VBScript Operator: /

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/foreslash.html (2 of 2) [29/07/2002 12:23:11]


DevGuru VBScript Operator: \

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: \
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML \
WMLScript
WSH The \ operator divides two numbers and returns an integer (fixed-point). Each number can be
XHTML either floating-point or fixed-point.
XML DOM
XSLT This operator works by rounding the values of the supplied operands to integers (if necessary)
Features before performing the calculation and only returns an integer with no decimal representation
Ask DevGuru (truncated).
ASP Resources
HTML Color Chart This first example requires no rounding of the operands and returns '6' ('6.25' truncated).
Find the Bug
Knowledge Base Code:
Links <% result = 25 \ 4 %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials 6
Products This next example demonstrates the 'pre-rounding' of the operands; the actual values used for
dgCalendar
the calculation eqate to '35\6' which returns '5' ('5.833r' truncated).
dgCharge
dgChart
dgEncrypt
Code:
dgFileUpload
<% result = 35.4 \ 6.01 %>
dgReport
dgSort Output:
dgTree 5
Site Compare the previous example to the next which returns '6' because the first operand has
Authoring been rounded internally to '36' before calculation.
Coming Soon
DevGuru Resume Code:
Errata <% result = 35.9 \ 6.01 %>
Link to Us
Merchandise Output:
Sponsorships 6
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/backslash.html (1 of 2) [29/07/2002 12:23:14]


DevGuru VBScript Operator: \

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/backslash.html (2 of 2) [29/07/2002 12:23:14]


DevGuru VBScript Operator *

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: *
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML *
WMLScript
WSH The * operator is used to multiply numbers.
XHTML
XML DOM Code:
XSLT <% answer = 2 * 3.14 * .71 %>
Features
Ask DevGuru Output:
ASP Resources 4.4588
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/asteric.html (1 of 2) [29/07/2002 12:23:15]


DevGuru VBScript Operator *

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/asteric.html (2 of 2) [29/07/2002 12:23:15]


DevGuru VBScript Operator: ^

Quick References
ADO All Operators
ASP
CSS2
HTML OPERATOR: ^
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML ^
WMLScript
WSH The ^ operator, which is sometimes called "hat", is used to raise a
XHTML number to a power.
XML DOM
XSLT Code:
Features <% power = 2^2 %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart 4
Find the Bug
Knowledge Base Code:
Links <% power = 4.819^1.753 %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials 15.7479305850686
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/hat.html (1 of 2) [29/07/2002 12:23:17]


DevGuru VBScript Operator: ^

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/hat.html (2 of 2) [29/07/2002 12:23:17]


DevGuru VBScript Constants: Color

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: COLOR
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML Color Constants
WMLScript
WSH You may use either the CONSTANT (left column) or the VALUE (center column) in your code
XHTML and get the same results.
XML DOM
XSLT
CONSTANT VALUE COLOR
Features
Ask DevGuru
VBBlack &h00 Black
ASP Resources
HTML Color Chart
VBRed &hFF Red
Find the Bug
Knowledge Base
VBGreen &hFF00 Green
Links
Tips of the Week
VBYellow &hFFFF Yellow
T-SQL Syntax Charts
Tutorials
VBBlue &hFF0000 Blue
Products
dgCalendar VBMagenta &hFF00FF Magenta
dgCharge
dgChart VBCyan &hFFFF00 Cyan
dgEncrypt
dgFileUpload VBWhite &hFFFFFF White
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/colorcon.html (1 of 2) [29/07/2002 12:23:19]


DevGuru VBScript Constants: Color

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/colorcon.html (2 of 2) [29/07/2002 12:23:19]


DevGuru VBScript Constants: Comparison

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: COMPARISON
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML Comparison Constants
WMLScript
WSH You may use either the CONSTANT (left column) or the VALUE (center column) in your code
XHTML and get the same results.
XML DOM
XSLT
CONSTANT VALUE DESCRIPTION
Features
Ask DevGuru
VBBinaryCompare 0 Binary comparison
ASP Resources
HTML Color Chart
VBTextCompare 1 Text Comparison
Find the Bug
Knowledge Base
VBDataBaseCompare 2 Compare information inside database
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/comparisoncon.html (1 of 2) [29/07/2002 12:23:23]


DevGuru VBScript Constants: Comparison

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/comparisoncon.html (2 of 2) [29/07/2002 12:23:23]


DevGuru VBScript Constants: Date Format

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: Date Format
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML Date Format Constants
WMLScript
WSH You may use either the CONSTANT (left column) or the VALUE (center column) in your code
XHTML and get the same results.
XML DOM
XSLT
CONSTANT VALUE DESCRIPTION
Features
Ask DevGuru
VBGeneralDate 0 Display the date and time using system settings
ASP Resources
HTML Color Chart
Display the date in long date format
Find the Bug VBLongDate 1
June 26, 1943
Knowledge Base
Links
Display the date in short date format
Tips of the Week VBShortDate 2
T-SQL Syntax Charts
6/26/43
Tutorials
Display the time in long time format
Products VBLongTime 3
3:48:01 PM
dgCalendar
dgCharge Display the time in short time format (24 hour clock)
dgChart VBShortTime 4
15:48
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dateformatcon.html (1 of 2) [29/07/2002 12:23:25]


DevGuru VBScript Constants: Date Format

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dateformatcon.html (2 of 2) [29/07/2002 12:23:25]


DevGuru VBScript Constants: Date And Time

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: Date And Time
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML Date And Time Constants
WMLScript
WSH You may use either the CONSTANT (left column) or the VALUE (center column) in your code
XHTML and get the same results.
XML DOM
XSLT
CONSTANT VALUE DESCRIPTION
Features
Ask DevGuru
VBSunday 1 Sunday
ASP Resources
HTML Color Chart
VBMonday 2 Monday
Find the Bug
Knowledge Base
VBTuesday 3 Tuesday
Links
Tips of the Week
VBWednesday 4 Wednesday
T-SQL Syntax Charts
Tutorials
VBThursday 5 Thursday
Products
dgCalendar VBFriday 6 Friday
dgCharge
dgChart VBSaturday 7 Saturday
dgEncrypt
dgFileUpload VBFirstJan1 1 Week of January 1
dgReport
dgSort VBFirstFourDays 2 First week of the year that has at least four days
dgTree
Site VBFirstFullWeek 3 First full week of the year
Authoring
Coming Soon Use the date format of the computer's regional
VBUseSystem 0
DevGuru Resume setting
Errata
Link to Us Use the first day of the week defined by system
VBUseSystemDayOfWeek 0
Merchandise settings
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/datetimecon.html (1 of 2) [29/07/2002 12:23:28]


DevGuru VBScript Constants: Date And Time

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/datetimecon.html (2 of 2) [29/07/2002 12:23:28]


DevGuru VBScript Constants: File Attribute Constants

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: FILE ATTRIBUTE
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML File Attribute Constants
WMLScript
WSH These are used with the File.Attributes property
XHTML
XML DOM
XSLT Name Value Description Read/Write attribute
Features
Ask DevGuru Normal 0 Normal file Read/write
ASP Resources
HTML Color Chart ReadOnly 1 Read-only file Read only
Find the Bug
Knowledge Base Hidden 2 Hidden file Read/write
Links
Tips of the Week
System 4 System file Read
T-SQL Syntax Charts
Tutorials
Volume 8 Disk drive volume label Read only
Products
dgCalendar
dgCharge
Directory 16 Folder or directory Read-only
dgChart
dgEncrypt File has changed since
Archive 32 Read/write
dgFileUpload last backup
dgReport
dgSort Alias 64 Link or shortcut Read-only
dgTree
Site Compressed 2048 Compressed file Read-only
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/fileattributecon.html (1 of 2) [29/07/2002 12:23:30]


DevGuru VBScript Constants: File Attribute Constants

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/fileattributecon.html (2 of 2) [29/07/2002 12:23:30]


DevGuru VBScript Constants: File Input/Output Constants

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: File Input/Output
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML File Input/Output Constants
WMLScript
WSH You may use either the CONSTANT (left column) or the VALUE (center column) in your
XHTML code and get the same results.
XML DOM
XSLT
CONSTANT VALUE DESCRIPTION
Features
Ask DevGuru
ForReading 1 Opens a file for reading only
ASP Resources
HTML Color Chart
Opens a file for writing. If the file already exists, the contents
Find the Bug ForWriting 2
are overwritten.
Knowledge Base
Links
Opens a file and starts writing at the end (appends).
Tips of the Week ForAppending 8
T-SQL Syntax Charts
Contents are not overwritten.
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/fileinoutcon.html (1 of 2) [29/07/2002 12:23:32]


DevGuru VBScript Constants: File Input/Output Constants

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/fileinoutcon.html (2 of 2) [29/07/2002 12:23:32]


DevGuru VBScript Constants: MsgBox

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: MsgBox
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML MsgBox Constants
WMLScript
WSH You may use either the CONSTANT (left column) or the VALUE (center column) in your code
XHTML and get the same results.
XML DOM
XSLT Specifying buttons and icons:
Features
Ask DevGuru
CONSTANT VALUE DESCRIPTION
ASP Resources
HTML Color Chart
VBOKOnly 0 Show OK button
Find the Bug
Knowledge Base
VBOKCancel 1 Show OK and cancel buttons
Links
Tips of the Week
T-SQL Syntax Charts
VBAbortRetryIgnore 2 Show abort, retry, ignore buttons
Tutorials
VBYesNoCancel 3 Show yes, no cancel buttons
Products
dgCalendar VBYesNo 4 Show yes, no buttons
dgCharge
dgChart VBRetryCancel 5 Show retry, cancel buttons
dgEncrypt
dgFileUpload VBCritical 16 Show critical message icon
dgReport
dgSort VBQuestion 32 Show warning query button
dgTree
Site VBExclaimation 48 Show warning message icon
Authoring
Coming Soon VBInformation 64 Show information message icon
DevGuru Resume
Errata VBFaultButton1 0 First button is default
Link to Us
Merchandise VBFaultButton2 256 Second button is default
Sponsorships
Testimonials VBFaultButton3 512 Third button is default

http://www.devguru.com/Technologies/vbscript/quickref/msgboxcon.html (1 of 2) [29/07/2002 12:23:35]


DevGuru VBScript Constants: MsgBox

What's New
VBFaultButton4 768 Fourth button is default
Partners
Code Project
DevelopersDex
Prog. Heaven Message box response modality:
Tek-Tips Forum
TopXML
VBXML.COM CONSTANT VALUE DESCRIPTION
VisualBuilder.com
W3Schools Current application will not continue until user responds
VBApplicationModal 0
XMLPitstop to message box
ZVON.org
Search Us! No application will continue until user responds to
VBSystemModal 4098
message box

Return values identifying which buttons were selected:

CONSTANT VALUE DESCRIPTION

VBOK 1 OK Button selected

VBCancel 2 Cancel button selected

VBAbort 3 Abort button selected

VBRetry 4 Retry button selected

VBIgnore 5 Ignore button selected

VBYes 6 Yes button selected

VBNo 7 No button selected

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/msgboxcon.html (2 of 2) [29/07/2002 12:23:35]


DevGuru VBScript Constants: Object Error

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: VBObjectError
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML VBObjectError Constant
WMLScript
WSH
XHTML CONSTANT VALUE
XML DOM
XSLT VBObjectError -2147221504
Features
Ask DevGuru
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/objecterrconstant.html (1 of 2) [29/07/2002 12:23:37]


DevGuru VBScript Constants: Object Error

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/objecterrconstant.html (2 of 2) [29/07/2002 12:23:37]


DevGuru VBScript Constants: String

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: String
JavaScript
Jet SQL String Constants
VBScript
WML You may use either the CONSTANT (left column) or the VALUE (center column) in your code
WMLScript and get the same results.
WSH
XHTML
XML DOM CONSTANT VALUE DESCRIPTION
XSLT
VBCR Chr(13) Carriage return
Features
Ask DevGuru
VBCrLf Chr(13) & Chr(10) Combined carriage return and line feed
ASP Resources
HTML Color Chart
VBFormFeed Chr(12) Form feed
Find the Bug
Knowledge Base
VBLF Chr(10) Line feed
Links
Tips of the Week
Chr(13) & Chr(10) Or
T-SQL Syntax Charts VBNewLine Newline character appropriate for platform
Chr(10)
Tutorials
Products VBNullChar Chr(0) Character value of zero
dgCalendar
dgCharge VBNullString String Of Value Zero Null string
dgChart
dgEncrypt VBTab Chr(9) Horizontal (row) tab
dgFileUpload
dgReport VBVerticalTab Chr(11) Vertical (column) tab
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/stringcon.html (1 of 2) [29/07/2002 12:23:39]


DevGuru VBScript Constants: String

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/stringcon.html (2 of 2) [29/07/2002 12:23:39]


DevGuru VBScript Constants: Tristate

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: Tristate
JavaScript
Jet SQL Tristate Constants
VBScript
WML You may use either the CONSTANT (left column) or the VALUE (center column) in your code
WMLScript and get the same results.
WSH
XHTML
XML DOM CONSTANT VALUE DESCRIPTION
XSLT
TristateTrue -1 True
Features
Ask DevGuru
TristateFalse 0 False
ASP Resources
HTML Color Chart
TristateUseDefault -2 Use default setting
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/tristatecon.html (1 of 2) [29/07/2002 12:23:41]


DevGuru VBScript Constants: Tristate

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/tristatecon.html (2 of 2) [29/07/2002 12:23:41]


DevGuru VBScript Constant: VarType

Quick References
ADO All Constants
ASP
CSS2
HTML CONSTANTS: VarType
JavaScript
Jet SQL VarType Constants
VBScript
WML You may use either the CONSTANT (left column) or the VALUE (center column) in your code
WMLScript and get the same results.
WSH
XHTML
XML DOM CONSTANT VALUE DESCRIPTION
XSLT
VBEmpty 0 Uninitialized
Features
Ask DevGuru
VBNull 1 Contains no valid data
ASP Resources
HTML Color Chart
VBInteger 2 Integer subtype
Find the Bug
Knowledge Base
VBLong 3 Long subtype
Links
Tips of the Week
VBSingle 4 Single subtype
T-SQL Syntax Charts
Tutorials
VBDouble 5 Double subtype
Products
dgCalendar VBCurrency 6 Currency subtype
dgCharge
dgChart VBDate 7 Date subtype
dgEncrypt
dgFileUpload VBString 8 String subtype
dgReport
dgSort VBObject 9 Object
dgTree
Site VBError 10 Error subtype
Authoring
Coming Soon VBBoolean 11 Boolean subtype
DevGuru Resume
Errata VBVariant 12 Variant (only use for arrays of variants)
Link to Us
Merchandise VBDataObject 13 Data access object
Sponsorships
Testimonials VBDecimal 14 Decimal subtype

http://www.devguru.com/Technologies/vbscript/quickref/vartypecon.html (1 of 2) [29/07/2002 12:23:44]


DevGuru VBScript Constant: VarType

What's New
VBByte 17 Byte subtype
Partners
Code Project
VBArray 8192 Array
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/vartypecon.html (2 of 2) [29/07/2002 12:23:44]


DevGuru VBScript Object: Class

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: Class
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML The term, Class, refers to any object that you create using the Class ... End Class statement.
WMLScript This ability to create your own object and to perform operations upon it using any valid
WSH VBScript code, represents a significant expansion of the versatility of the VBScript language.
XHTML
XML DOM
Note that Class is a keyword and you may not use it as a class name.
XSLT
Features The following example creates a simple Class, 'User', that has a single property, 'UserName',
Ask DevGuru
and one method, 'DisplayUserName'.
ASP Resources
HTML Color Chart
Find the Bug Code:
Knowledge Base <%
Links Class User
Tips of the Week
T-SQL Syntax Charts ' declare private class variable
Tutorials
Private m_userName
Products
dgCalendar
' declare the property
dgCharge
dgChart Public Property Get UserName
dgEncrypt UserName = m_userName
dgFileUpload End Property
dgReport
dgSort
dgTree
Public Property Let UserName (strUserName)
Site m_userName = strUserName
Authoring End Property
Coming Soon
DevGuru Resume ' declare and define the method
Errata
Sub DisplayUserName
Link to Us
Merchandise Response.Write UserName
Sponsorships End Sub
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/Class.html (1 of 2) [29/07/2002 12:23:46]


DevGuru VBScript Object: Class

What's New End Class


Partners %>
Code Project
DevelopersDex
Prog. Heaven After you have declared your Class, then, as demonstrated below, you may create an instance
Tek-Tips Forum of that Class (i.e., object) using Set and New.
TopXML
VBXML.COM Code:
VisualBuilder.com <%
W3Schools Dim objUser
XMLPitstop Set objUser = New User
ZVON.org
Search Us! ' set the UserName property
objUser.UserName = "The Guru"

' call the DisplayUserName method


' to print the user name
objUser.DisplayUserName
%>

Output:
"The Guru"

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/Class.html (2 of 2) [29/07/2002 12:23:46]


DevGuru VBScript Object: Dictionary

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: Dictionary
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML The Dictionary object stores name/value pairs (referred to as the key and item respectively) in
WMLScript an array. The key is a unique identifier for the corresponding item and cannot be used for any
WSH other item in the same Dictionary object.
XHTML
XML DOM The following code creates a Dictionary object called "cars", adds some key/item pairs,
XSLT retrieves the item value for the key 'b' using the Item property and then outputs the resulting
Features string to the browser.
Ask DevGuru
ASP Resources
Code:
HTML Color Chart <%
Find the Bug Dim cars
Knowledge Base Set cars = CreateObject("Scripting.Dictionary")
Links cars.Add "a", "Alvis"
Tips of the Week cars.Add "b", "Buick"
T-SQL Syntax Charts cars.Add "c", "Cadillac"
Tutorials Response.Write "The value corresponding to the key 'b' is " & cars.Item("b")
%>
Products
dgCalendar Output:
dgCharge "The value corresponding to the key 'b' is Buick"
dgChart
dgEncrypt PROPERTIES
dgFileUpload
dgReport CompareMode Property
dgSort The CompareMode property is used to set and return the key's string comparison mode which
dgTree determines how keys are matched while looking up or searching.
Site
Authoring Syntax: object.CompareMode[ = comparison_mode]
Coming Soon
DevGuru Resume Count Property
Errata The Count property is used to determine the number of key/item pairs in the Dictionary object.
Link to Us
Merchandise
Syntax: object.Count
Sponsorships
Item Property
Testimonials
The Item property allows us to retreive the value of an item in the collection designated by the

http://www.devguru.com/Technologies/vbscript/quickref/dictionary.html (1 of 2) [29/07/2002 12:23:48]


DevGuru VBScript Object: Dictionary

What's New specified key argument and also to set that value by using itemvalue.
Partners
Code Project Syntax: object.Item(key) [ = itemvalue]
DevelopersDex
Prog. Heaven Key Property
Tek-Tips Forum The Key property lets us change the key value of an existing key/item pair.
TopXML
VBXML.COM Syntax: object.Key(keyvalue) = newkeyvalue
VisualBuilder.com
W3Schools METHODS
XMLPitstop
ZVON.org Add Method
Search Us! The Add method is used to add a new key/item pair to a Dictionary object.

Syntax: object. Addkeyvalue, itemvalue

Exists Method
The Exists method is used to determine whether a key already exists in the specified
Dictionary. Returns True if it does and False otherwise.

Syntax: object.Exists(keyvalue)

Items Method
The Items method is used to retreive all of the items in a particular Dictionary object and store
them in an array.

Syntax: [arrayname = ]object.Items

Keys Method
The Keys method is used to retreive all of the keys in a particular Dictionary object and store
them in an array.

Syntax: [arrayname = ]object.Keys

Remove Method
The Remove method is used to remove a single key/item pair from the specified Dictionary
object.

Syntax: object. Remove(keyvalue)

RemoveAll Method
The RemoveAll method is used to remove all the key/item pairs from the specified Dictionary
object.

Syntax: object.RemoveAll

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dictionary.html (2 of 2) [29/07/2002 12:23:48]


DevGuru VBScript Object: Drive

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: Drive
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML The Drive object provides access to the various properties of the local or remote disk drive.
WMLScript
WSH The following code uses the GetDrive method of the FileSystemObject object to get the Drive
XHTML object for drive "c".
XML DOM
XSLT Code:
Features <%
Set filesys = CreateObject("Scripting.FileSystemObject")
Ask DevGuru
ASP Resources
Set drv = filesys.GetDrive("c")
HTML Color Chart
%>
Find the Bug
PROPERTIES
Knowledge Base
Links AvailableSpace Property
Tips of the Week
Returns the amount of space available on the specified local or remote disk drive.
T-SQL Syntax Charts
Tutorials Syntax: object.AvailableSpace
Products
dgCalendar DriveLetter Property
dgCharge Returns the dirve letter of the specified local or remote disk drive. Read only.
dgChart
dgEncrypt Syntax: object.DriveLetter
dgFileUpload
DriveType Property
dgReport
dgSort Returns an integer indicating the type of the drive.
dgTree
Syntax: object.DriveType
Site
Authoring FileSystem Property
Coming Soon This property returns the file system type that is in use on the specified drive.
DevGuru Resume
Errata Syntax: object.FileSystem
Link to Us
Merchandise FreeSpace Property
Sponsorships Returns the amount of free space available to a user on the specified local or remote drive.
Testimonials
Syntax: object.FreeSpace

http://www.devguru.com/Technologies/vbscript/quickref/drive.html (1 of 2) [29/07/2002 12:23:52]


DevGuru VBScript Object: Drive

What's New
Partners IsReady Property
Code Project This property is a Boolean whose value is True if the specified drive is available for use and
DevelopersDex False otherwise.
Prog. Heaven
Tek-Tips Forum Syntax: object.IsReady
TopXML
VBXML.COM Path Property
VisualBuilder.com Returns the path for a specified file, folder or drive.
W3Schools
XMLPitstop Syntax: object.Path
ZVON.org
Search Us!
RootFolder Property
Returns a Folder object that represents the root folder of the specified drive.

Syntax: object.RootFolder

SerialNumberProperty
Returns the decimal serial number for the specified drive. This number can be used to uniquely
identify a disk volume.

Syntax: object.SerialNumber

ShareName Property
Returns the network name in Universal Naming Convention (UNC) for the remote disk drive.
Used only when working with a remote drive (DriveType property is 3).

Syntax: object.ShareName

TotalSize Property
Returns the total space, in bytes, of the specified drive.

Syntax: object.TotalSize

VolumeName Property
Sets or returns the volume name of the specified drive.

Syntax: object. VolumeName [ = newname]

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/drive.html (2 of 2) [29/07/2002 12:23:52]


DevGuru VBScript Object: Drives Collection

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: Drives Collection
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML The Drives collection is the collection of all the disk drives available on the system. This
WMLScript collection is obtained through the Drives property of the FileSystemObject object.
WSH
XHTML The following code gets the Drives collection, creates a list of available drives and displays the
XML DOM results in the browser.
XSLT
Features Code:
<%
Ask DevGuru
ASP Resources
Dim filesys, drv, drvcoll, drvlist, vol
HTML Color Chart
Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug Set drvcoll = filesys.Drives
Knowledge Base For Each drv in drvcoll
Links drvlist = drvlist & drv.DriveLetter
Tips of the Week If drv.IsReady Then
T-SQL Syntax Charts vol = drv.VolumeName
Tutorials End If
drvlist = drvlist & vol & ", "
Products
Next
dgCalendar
Response.Write "Drives available on this system are " & drvlist
dgCharge
%>
dgChart
dgEncrypt
Output:
dgFileUpload
"Drives available on this system are A, C, D, E, "
dgReport
dgSort PROPERTIES
dgTree
Site Count Property
Authoring Returns an integer that tells us how many Drive objects there are in the collection (the number
Coming Soon of local and remote drives available).
DevGuru Resume
Errata Syntax: object.Count
Link to Us
Merchandise
Item Property
Sponsorships The Item property allows us to retreive the value of an item in the collection designated by the
Testimonials specified key argument and also to set that value by using itemvalue.

http://www.devguru.com/Technologies/vbscript/quickref/drivescollection.html (1 of 2) [29/07/2002 12:23:54]


DevGuru VBScript Object: Drives Collection

What's New Syntax: object.Item(key) [ = itemvalue]


Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/drivescollection.html (2 of 2) [29/07/2002 12:23:54]


DevGuru VBScript Object: Err Object

Quick References
ADO Dictionary Object
ASP
CSS2
HTML OBJECT: Err
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML The Err object holds information about the last runtime error that occured. It is not nessecary to
WMLScript create an instance of this object; it is intrinsic to VBScript. Its default property is Number, which
WSH contains an integer representing a VBScript error number or an ActiveX control Status Code
XHTML (SCODE) number. This value is automatically generated when an error occurs and is reset to
XML DOM zero (no error) after an On Error Resume Next statement or after using the Clear method.
XSLT
Features The following code checks the value of the Number property and, if it contains a value other
Ask DevGuru than zero, displays the details in the browser.
ASP Resources
HTML Color Chart Code:
Find the Bug <%
Knowledge Base dim numerr, abouterr
Links On Error Resume Next
Tips of the Week Err.Raise 6
T-SQL Syntax Charts numerr = Err.number
Tutorials abouterr = Err.description
If numerr <> 0 Then
Products
Response.Write "An Error has occured! Error number " & numerr & " of_
dgCalendar
the type '" & abouterr & "'."
dgCharge
End If
dgChart
%>
dgEncrypt
dgFileUpload
Output:
dgReport
"An Error has occured! Error number 6 of the type 'Overflow'."
dgSort
dgTree PROPERTIES
Site
Authoring Description Property
Coming Soon This property returns or sets a string containing a brief textual description of an error.
DevGuru Resume
Errata Syntax: object.Description [ = string]
Link to Us
Merchandise HelpContext Property
Sponsorships This property is used to set or return a context ID for a Help topic specified with the HelpFile
Testimonials property.

http://www.devguru.com/Technologies/vbscript/quickref/err.html (1 of 2) [29/07/2002 12:23:56]


DevGuru VBScript Object: Err Object

What's New
Partners Syntax: object.HelpContext [ = contextID]
Code Project
DevelopersDex
HelpFile Property
Prog. Heaven This property is used to get or define the path to a Help file.
Tek-Tips Forum
TopXML Syntax: object.HelpFile [ = contextID]
VBXML.COM
Number Property
VisualBuilder.com
W3Schools This property is used to retrieve or set the value that relates to a specific runtime error.
XMLPitstop
ZVON.org
Syntax: object.Number [ = errnumber]
Search Us!
Source Property
This property lets us determine the object or application that caused an error, and returns a
string that contains its Class name or programmatic ID.

Syntax: object.Source [ = string]

METHODS

Clear Method
This method is used to clear the settings of the Error object.

Syntax: object.Clear

Raise Method
This method is used to generate a VBScript runtime error.

Syntax: object. Raise (number[, source, description, helpfile, helpcontext])

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/err.html (2 of 2) [29/07/2002 12:23:56]


DevGuru VBScript Object: File

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: File
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML The File object allows you access and manipulate the various properties of a file.
WMLScript
WSH The following code uses the GetFile method of the FileSystemObject object to create a File
XHTML object and view one of its properties.
XML DOM
XSLT Code:
Features <%
Ask DevGuru Dim filesys, demofile, createdate
ASP Resources Set filesys = CreateObject("Scripting.FileSystemObject")
HTML Color Chart Set demofile = filesys.GetFile("filename")
Find the Bug createdate = demofile.DateCreated
Knowledge Base %>
Links
Tips of the Week PROPERTIES
T-SQL Syntax Charts
Tutorials
Attributes Property
This property allows us to get or change the various attributes of a file.
Products
dgCalendar Syntax: object.Atributes [ = newattributes]
dgCharge
dgChart DateCreated Property
dgEncrypt This property gets the date and time that the file was created.
dgFileUpload
dgReport Syntax: object.DateCreated
dgSort
dgTree DateLastAccessed Property
Site Gets the date and time that the file was last accessed.
Authoring
Syntax: object.DateLastAccessed
Coming Soon
DevGuru Resume DateLastModified Property
Errata
This property returns the date and time that the file was last modified.
Link to Us
Merchandise Syntax: object.DateLastModified
Sponsorships
Testimonials Drive Property

http://www.devguru.com/Technologies/vbscript/quickref/file.html (1 of 3) [29/07/2002 12:23:58]


DevGuru VBScript Object: File

What's New Returns the drive letter of the drive where the file is located.
Partners
Code Project Syntax: object.Drive
DevelopersDex
Prog. Heaven
Name Property
Tek-Tips Forum Lets us get or change the name of the specified file.
TopXML
Syntax: object.Name [ = newname]
VBXML.COM
VisualBuilder.com
ParentFolder Property
W3Schools
This property gets the Folder object for the parent relating to the specified file.
XMLPitstop
ZVON.org
Syntax: object.ParentFolder
Search Us!
Path Property
This property returns a file's path.

Syntax: object.Path

ShortName Property
Returns the short version of a filename (using the 8.3 convention).
e.g. Employees.html is truncated to Employ~1.htm

Syntax: object.ShortName

ShortPath Property
Returns the short version of the file path (this is the path with any folder and file names
truncated as above).

Syntax: object.ShortPath

Size Property
Returns the size of a file in bytes.

Syntax: object.Size

TypeProperty
Returns a string containing the file type description.
e.g. For files ending in .TXT, "Text Document" is returned.

Syntax: object.Type

METHODS

Copy Method
This method copies the selected file to the specified destination.

Syntax: object.Copy destination[, overwrite]

Delete Method
The method used to delete the file relating to the specified File object.

Syntax: object.Delete [force]

Move Method
This method is used to move the file relating to the specified File object to a new destination.

http://www.devguru.com/Technologies/vbscript/quickref/file.html (2 of 3) [29/07/2002 12:23:58]


DevGuru VBScript Object: File

Syntax: object.Move destination

OpenAsTextStream Method
This method opens a specified file and returns an instance of a TextStream object that can
then be manipulated - read from, written or appended to.

Syntax: object.OpenAsTextStream([iomode [, format]])

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/file.html (3 of 3) [29/07/2002 12:23:58]


DevGuru VBScript Object: Files Collection

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: Files Collection
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML The Files collection contains a set of File objects and is usually stored as a property of another
WMLScript object, such as a Folder object.
WSH
XHTML The following code demonstrates how to get a Files collection and list the contents in the
XML DOM browser.
XSLT
Features Code:
<%
Ask DevGuru
ASP Resources
Dim filesys, demofolder, fil, filecoll, filist
HTML Color Chart
Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug Set demofolder = filesys.GetFolder("foldername")
Knowledge Base Set filecoll = demofolder.Files
Links For Each fil in filecoll
Tips of the Week filist = filist & fil.name
T-SQL Syntax Charts filist = filist & "<BR>"
Tutorials Next
Response.Write filist
Products
%>
dgCalendar
dgCharge PROPERTIES
dgChart
dgEncrypt Count Property
dgFileUpload Returns an integer that tells us how many File objects there are in the collection.
dgReport
dgSort Syntax: object.Count
dgTree
Site Item Property
Authoring The Item property allows us to retreive the value of an item in the collection designated by the
Coming Soon specified key argument and also to set that value by using itemvalue.
DevGuru Resume
Errata Syntax: object.Item(key) [ = itemvalue]
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filescollection.html (1 of 2) [29/07/2002 12:24:00]


DevGuru VBScript Object: Files Collection

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filescollection.html (2 of 2) [29/07/2002 12:24:00]


DevGuru VBScript Object: FileSystemObject

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: FileSystemObject
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML The FileSystemObject is used to gain access to a computer's file system. It can create new
WMLScript files and access existing ones.
WSH
XHTML The following code uses the CreateTextFile method of the FileSystemObject object to create
XML DOM a text file (c:\somefile.txt) and then writes some text to it.
XSLT
Features Code:
Ask DevGuru <%
ASP Resources dim filesys, filetxt, getname, path
HTML Color Chart Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug Set filetxt = filesys.CreateTextFile("c:\somefile.txt", True)
Knowledge Base path = filesys.GetAbsolutePathName("c:\somefile.txt")
Links getname = filesys.GetFileName(path)
Tips of the Week filetxt.WriteLine("Your text goes here.")
T-SQL Syntax Charts filetxt.Close
Tutorials If filesys.FileExists(path) Then
Products Response.Write ("Your file, '" & getname & "', has been created.")
dgCalendar End If
dgCharge %>
dgChart
dgEncrypt Output:
dgFileUpload "Your file, 'somefile.txt', has been created."
dgReport
dgSort PROPERTIES
dgTree
Drives Property
Site Returns a Drives collection consisting of all the Drive objects on a computer.
Authoring
Coming Soon Syntax: [drvcollection = ] object.Drives
DevGuru Resume
Errata METHODS
Link to Us
Merchandise BuildPath Method
Sponsorships This method is used to append a name onto an existing path.
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject.html (1 of 4) [29/07/2002 12:24:03]


DevGuru VBScript Object: FileSystemObject

What's New [newfullpath = ]object.BuildPath(path, name)


Partners
Code Project CopyFile Method
DevelopersDex This method allows us to copy one or more files from one location (the source) to another
Prog. Heaven (destination).
Tek-Tips Forum
TopXML Syntax: object.CopyFile source, destination [, overwrite]
VBXML.COM
VisualBuilder.com CopyFolder Method
W3Schools Copies one or more folders and all contents, including files and subfolders, from one location to
XMLPitstop another.
ZVON.org
Search Us! Syntax: object.CopyFolder source, destination, [, overwrite]

CreateFolder Method
This method allows us to create a folder.

Syntax: object.CreateFolderfoldername

CreateTextFile Method
Creates a text file and returns a TextStreamObject that can then be used to write to and read
from the file.

Syntax: object.CreateTextFile filename [, overwrite[, unicode]]

DeleteFile Method
This method deletes a specified file or files (using wilcards).

Syntax: object.DeleteFile file [, force]

DeleteFolder Method
This method deletes a specified folder, including all files and subfolders.

Syntax: object.DeleteFolder folder [, force]

DriveExists Method
This method lets us check if a specified drive exists. It returns True if the drive does exist and
False if it doesn't.

Syntax: object.DriveExists(drive)

FileExists Method
Lets us check whether a specified file exists. Returns True if the file does exist and False
otherwise.

Syntax: object.FileExists(file)

FolderExists Method
Allows us to check if a specified folder exists. Returns True if the folder does exist and False if
it doesn't.

Syntax: object.FolderExists(folder)

GetAbsolutePathName Method
This method gets the complete path from the root of the drive for the specified path string.

Syntax: object.GetAbsolutePathName(path)

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject.html (2 of 4) [29/07/2002 12:24:03]


DevGuru VBScript Object: FileSystemObject

GetBaseName Method
This method gets the base name of the file or folder in a specified path.

Syntax: object.GetBaseName(path)

GetDrive Method
This method returns a Drive object corresponding to the drive in a supplied path.

Syntax: object.GetDrive(drive)

GetDriveName Method
This method gets a string containing the name of the drive in a supplied path.

Syntax: object.GetDriveName(path)

GetExtensionName Method
Used to return a string containing the extension name of the last component in a supplied path.

Syntax: object.GetExtensionName(path)

GetFile Method
Returns the File object for the specified file name.

Syntax: object.GetFile(filename)

GetFileName Method
This method is used to return the name of the last file or folder of the supplied path.

Syntax: object.GetFileName(path)

GetFolder Method
This method returns a Folder object fo the folder specified in the folder parameter.

Syntax: object.GetFolder(folder)

GetParentFolderName Method
Returns a string containing the name of the parent folder of the last file or folder in a specified
path.

Syntax: object.GetParentFolderName(path)

GetSpecialFolder Method
Returns the path to one of the special folders - \Windows, \System or \TMP.

Syntax: object.GetSpecialFolder(folder)

GetTempName Method
This method is used to generate a random filename for a temporary file..

Syntax: object.GetTempName

MoveFile Method
Moves one or more files from one location to another.

Syntax: object.MoveFile source, destination

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject.html (3 of 4) [29/07/2002 12:24:03]


DevGuru VBScript Object: FileSystemObject

MoveFolder Method
Moves one or more folders from one location to another.

Syntax: object.MoveFolder source, destination

OpenTextFile Method
Opens the file specified in the filename parameter and returns an instance of the
TextStreamObject for that file.

Syntax: object.OpenTextFile(filename [, iomode[, create[, format]]])

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject.html (4 of 4) [29/07/2002 12:24:03]


DevGuru VBScript Object: Folder

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: Folder
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML The Folder object allows you access and manipulate the various properties of a folder.
WMLScript
WSH The following code uses the GetFolder method of the FileSystemObject object to obtain
XHTML a Folder object and view one of its properties.
XML DOM
XSLT Code:
Features <%
Ask DevGuru Dim filesys, demofolder, createdate
ASP Resources Set filesys = CreateObject("Scripting.FileSystemObject")
HTML Color Chart Set demofolder = filesys.GetFolder("foldername")
Find the Bug createdate = demofolder.DateCreated
Knowledge Base %>
Links
Tips of the Week PROPERTIES
T-SQL Syntax Charts
Tutorials
Attributes Property
This property allows us to get or change the various attributes of a file.
Products
dgCalendar Syntax: object.Atributes [ = newattributes]
dgCharge
dgChart DateCreated Property
dgEncrypt This property gets the date and time that the folder was created.
dgFileUpload
dgReport Syntax: object.DateCreated
dgSort
dgTree DateLastAccessed Property
Site Gets the date and time that the folder was last accessed.
Authoring
Syntax: object.DateLastAccessed
Coming Soon
DevGuru Resume DateLastModified Property
Errata
This property gets the date and time that the folder was last modified.
Link to Us
Merchandise Syntax: object.DateLastModified
Sponsorships
Testimonials Drive Property

http://www.devguru.com/Technologies/vbscript/quickref/folder.html (1 of 3) [29/07/2002 12:24:05]


DevGuru VBScript Object: Folder

What's New Returns the drive letter of the drive where the folder is located.
Partners
Code Project Syntax: object.Drive
DevelopersDex
Prog. Heaven
Files Property
Tek-Tips Forum Returns a Files collection consisting of all the File objects in the specified folder.
TopXML
VBXML.COM
Syntax: object.Files
VisualBuilder.com
IsRootFolder Property
W3Schools
Returns a Boolean value: True if the folder is the root folder, and False otherwise.
XMLPitstop
ZVON.org
Syntax: object.IsRootFolder
Search Us!
Name Property
This property lets us get or change the name of the specified folder.

Syntax: object.Name [ = newname]

ParentFolder Property
This property gets the parent Folder object relating to the specified folder.

Syntax: object.ParentFolder

Path Property
This property returns a folder's path.

Syntax: object.Path

ShortName Property
Returns the short version of a folder name (using the 8.3 convention). e.g. the folder
'testingshortname' is truncated to 'testin~1'.

Syntax: object.ShortName

ShortPath Property
Returns the short version of the folder path (this is the path with any folder and file names
truncated as above).

Syntax: object.ShortPath

Size Property
Returns the size of the specified folder and its contents (in bytes).

Syntax: object.Size

SubFolders Property
This property returns a Folders collection that consists of all the folders in the specified
folder.

Syntax: object.SubFolders

Type Property
Returns a string containing the folder type description.

Syntax: object.Type

METHODS

http://www.devguru.com/Technologies/vbscript/quickref/folder.html (2 of 3) [29/07/2002 12:24:05]


DevGuru VBScript Object: Folder

Copy Method
Copies the specified folder from one location to another.

Syntax: object.Copy destination[, overwrite]

CreateTextFile Method
This method is used to create a text file and returns a TextStreamObject that can then
be used to write to and read from the file.

Syntax: object.CreateTextFile(filename,[, overwrite[, unicode]]))

Delete Method
Deletes the specified folder.

Syntax: object.Delete [force]

Move Method
Moves the specified folder from one location to another.

Syntax: object.Move destination

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/folder.html (3 of 3) [29/07/2002 12:24:05]


DevGuru VBScript Object: Folders Collection

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: Folders Collection
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML When using an instance of the Folder object, its SubFolder property returns a Folders
WMLScript collection consisting of all the subfolders (Folder objects) in that folder.
WSH
XHTML The following code illustrates how to get a Folders collection and display its contents in the
XML DOM browser.
XSLT
Features Code:
<%
Ask DevGuru
ASP Resources
Dim filesys, demofolder, subfol, folcoll, folist
HTML Color Chart
Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug Set demofolder = filesys.GetFolder(folderspec)
Knowledge Base Set folcoll = demofolder.SubFolders
Links For Each subfol in folcoll
Tips of the Week folist = folist & subfol.Name
T-SQL Syntax Charts folist = folist & "<BR>"
Tutorials Next
Response.Write folist
Products
%>
dgCalendar
dgCharge
dgChart PROPERTIES
dgEncrypt
dgFileUpload Count Property
dgReport Returns an integer that tells us how many Folder objects there are in the collection.
dgSort
dgTree Syntax: object.Count
Site
Item Property
Authoring
Coming Soon
The Item property allows us to retreive the value of an item in the collection designated by the
DevGuru Resume specified key argument and also to set that value by using itemvalue.
Errata
Link to Us
Syntax: object.Item(key) [ = itemvalue]
Merchandise
METHODS
Sponsorships
Testimonials
Add Method

http://www.devguru.com/Technologies/vbscript/quickref/folderscollection.html (1 of 2) [29/07/2002 12:24:07]


DevGuru VBScript Object: Folders Collection

What's New This method is used to add a new Folder to a Folders collection.
Partners
Code Project Syntax: object.Add("foldername")
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/folderscollection.html (2 of 2) [29/07/2002 12:24:07]


DevGuru VBScript Object: Match

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: Match
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML The Match object is used to access the three read-only properties associated with the results
WMLScript of a search and match operation that uses a regular expression.
WSH
XHTML Simply put, a regular expression is a string pattern that you can compare against all or a
XML DOM portion of another string. However, in all fairness, be warned that regular expressions can get
XSLT very complicated.
Features
Ask DevGuru The RegExp object can be used to search for and match string patterns in another string. A
ASP Resources Match object is created each time the RegExp object finds a match. Since, zero or more
HTML Color Chart matches could be made, the RegExp object actually return a collection of Match objects which
Find the Bug is refered to as a Matches collection.
Knowledge Base
Links The following code is a simplier, working version of a program published by Microsoft.
Tips of the Week
T-SQL Syntax Charts Code:
Tutorials <%
Products 'this sub finds the matches
dgCalendar Sub RegExpTest(strMatchPattern, strPhrase)
dgCharge 'create variables
dgChart Dim objRegEx, Match, Matches, StrReturnStr
dgEncrypt 'create instance of RegExp object
dgFileUpload Set objRegEx = New RegExp
dgReport
dgSort 'find all matches
dgTree objRegEx.Global = True
Site 'set case insensitive
Authoring
objRegEx.IgnoreCase = True
Coming Soon 'set the pattern
DevGuru Resume objRegEx.Pattern = strMatchPattern
Errata
Link to Us 'create the collection of matches
Merchandise Set Matches = objRegEx.Execute(strPhrase)
Sponsorships
Testimonials 'print out all matches
For Each Match in Matches

http://www.devguru.com/Technologies/vbscript/quickref/match.html (1 of 2) [29/07/2002 12:24:09]


DevGuru VBScript Object: Match

What's New strReturnStr = "Match found at position "


Partners strReturnStr = strReturnStr & Match.FirstIndex & ". Match Value is '"
Code Project strReturnStr = strReturnStr & Match.value & "'." & "<BR>" & VBCrLf
DevelopersDex 'print
Prog. Heaven Response.Write(strReturnStr)
Tek-Tips Forum Next
TopXML End Sub
VBXML.COM
VisualBuilder.com 'call the subroutine
W3Schools RegExpTest "is.", "Is1 is2 Is3 is4"
XMLPitstop %>
ZVON.org
Search Us! Output:
Match found at position 0. Match Value is 'Is1'.
Match found at position 4. Match Value is 'is2'.
Match found at position 8. Match Value is 'Is3'.
Match found at position 12. Match Value is 'is4'.

PROPERTIES

FirstIndex Property
This property returns the position, counted from the left with the first position being numbered
zero, in a string where a match was made.

Syntax: Match.FirstIndex

Length Property
This property returns the length of the matched text found in a search string.

Syntax: Match.Length

Value Property
This property returns the actual text that was matched during the search.

Syntax: Match.Value

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/match.html (2 of 2) [29/07/2002 12:24:09]


DevGuru VBScript Object: Matches Collection

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: Matches Collection
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML The Matches Collection is a collection of objects that contains the results of a search and
WMLScript match operation that uses a regular expression.
WSH
XHTML Simply put, a regular expression is a string pattern that you can compare against all or a
XML DOM portion of another string. However, in all fairness, be warned that regular expressions can get
XSLT very complicated.
Features
Ask DevGuru The RegExp object can be used to search for and match string patterns in another string. A
ASP Resources Match object is created each time the RegExp object finds a match. Since, zero or more
HTML Color Chart matches could be made, the RegExp object actually return a collection of Match objects which
Find the Bug is refered to as a Matches collection.
Knowledge Base
Links The following code is a simplier, working version of a program published by Microsoft. Note
Tips of the Week how the For Each ... Next statement is used to loop through the Matches collection.
T-SQL Syntax Charts
Tutorials Code:
Products <%
dgCalendar 'this sub finds the matches
dgCharge Sub RegExpTest(strMatchPattern, strPhrase)
dgChart 'create variables
dgEncrypt Dim objRegEx, Match, Matches, StrReturnStr
dgFileUpload 'create instance of RegExp object
dgReport Set objRegEx = New RegExp
dgSort
dgTree 'find all matches
Site objRegEx.Global = True
Authoring 'set case insensitive
Coming Soon objRegEx.IgnoreCase = True
DevGuru Resume 'set the pattern
Errata objRegEx.Pattern = strMatchPattern
Link to Us
Merchandise 'create the collection of matches
Sponsorships Set Matches = objRegEx.Execute(strPhrase)
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/matches_collection.html (1 of 2) [29/07/2002 12:24:12]


DevGuru VBScript Object: Matches Collection

What's New 'print out all matches


Partners For Each Match in Matches
Code Project strReturnStr = "Match found at position "
DevelopersDex strReturnStr = strReturnStr & Match.FirstIndex & ". Match Value is '"
Prog. Heaven strReturnStr = strReturnStr & Match.value & "'." & "<BR>" & VBCrLf
Tek-Tips Forum 'print
TopXML Response.Write(strReturnStr)
VBXML.COM : Next
VisualBuilder.com End Sub
W3Schools
XMLPitstop 'call the subroutine
ZVON.org RegExpTest "is.", "Is1 is2 Is3 is4"
Search Us! %>

Output:
Match found at position 0. Match Value is 'Is1'.
Match found at position 4. Match Value is 'is2'.
Match found at position 8. Match Value is 'Is3'.
Match found at position 12. Match Value is 'is4'.

PROPERTIES

Count Property
Returns an integer that tells us how many Match objects there are in the Matches Collection.

Syntax: object.Count

Item Property
The Item property allows us to retreive the value of an item in the collection designated by the
specified key argument and also to set that value by using itemvalue.

Syntax: object.Item(key) [ = itemvalue]

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/matches_collection.html (2 of 2) [29/07/2002 12:24:12]


DevGuru VBScript Function: Abs

Quick References
ADO All Objects
ASP
CSS2
HTML OBJECT: RegExp
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML The RegExp object is used to look for and match all occurrences of a search string pattern
WMLScript inside a target string.
WSH
XHTML Each time the RegExp object finds a match during the search, a Match object is created and
XML DOM added to a Matches collection.
XSLT
Features The search pattern is declared using the Pattern property. It could, for example, be a simple
Ask DevGuru string, such as "cost analysis". However, the search pattern can also be a regular expression.
ASP Resources Regular expressions can range from being very simple to being extremely complex. The
HTML Color Chart Pattern property page contains an introductory listing of special characters that can be used
Find the Bug with regular expressions.
Knowledge Base
Links The following code is a simpler, working version of a program published by Microsoft. Note the
Tips of the Week use of the keyword New when you create a RegExp object using Set.
T-SQL Syntax Charts
Tutorials Code:
Products <%
dgCalendar 'this sub finds the matches
dgCharge Sub RegExpTest(strMatchPattern, strPhrase)
dgChart 'create variables
dgEncrypt Dim objRegEx, Match, Matches, StrReturnStr
dgFileUpload 'create instance of RegExp object
dgReport Set objRegEx = New RegExp
dgSort
dgTree 'find all matches
Site objRegEx.Global = True
Authoring
'set case insensitive
Coming Soon objRegEx.IgnoreCase = True
DevGuru Resume 'set the pattern
Errata objRegEx.Pattern = strMatchPattern
Link to Us
Merchandise
'create the collection of matches
Sponsorships
Set Matches = objRegEx.Execute(strPhrase)
Testimonials
'print out all matches

http://www.devguru.com/Technologies/vbscript/quickref/regexp.html (1 of 3) [29/07/2002 12:24:14]


DevGuru VBScript Function: Abs

What's New For Each Match in Matches


Partners strReturnStr = "Match found at position "
Code Project strReturnStr = strReturnStr & Match.FirstIndex & ". Match Value is '"
DevelopersDex strReturnStr = strReturnStr & Match.value & "'."
Prog. Heaven 'print
Tek-Tips Forum Response.Write(strReturnStr & "<BR>")
TopXML Next
VBXML.COM End Sub
VisualBuilder.com
W3Schools 'call the subroutine
XMLPitstop RegExpTest "is.", "Is1 is2 Is3 is4"
ZVON.org %>
Search Us!
Output:
Match found at position 0. Match Value is 'Is1'.
Match found at position 4. Match Value is 'is2'.
Match found at position 8. Match Value is 'Is3'.
Match found at position 12. Match Value is 'is4'.

PROPERTIES

Global Property
This property is only used with a RegExp object variable and returns a Boolean value. False
signifies that a search should only find the first occurrence of a match. True signifies that a
search should find all occurrences of a match.

Syntax: object.Global = [ True | False ]

IgnoreCase Property
This property is only used with a RegExp object variable and returns a Boolean value. False
signifies that a search should be case-sensitive (i.e., upper versus lower case). True signifies
that a search should ignore case in a match.

Syntax: object.IgnoreCase = [ True | False ]

Pattern Property
This property defines the regular expression or search pattern string that is to be matched
during the search.

Syntax: object.Pattern = [ SearchPatternString ]

METHODS

Execute Method
This method is used to execute the search and to look for matches of the search pattern string
(or regular expression) and the target string. Each time a match is made, a Match object is
created and added to a collection that is called a Matches collection.

Syntax: object.Execute

Replace Method
This method is used to replace text found in a regular expression search. Do not confuse this
method with the Replace function.

Syntax: object.Replace (String1, String2)

http://www.devguru.com/Technologies/vbscript/quickref/regexp.html (2 of 3) [29/07/2002 12:24:14]


DevGuru VBScript Function: Abs

Test Method
This method is used to determine if the search pattern occurs within a specified string and
returns a Boolean value to signify the results of the search. True is returned if the pattern is
found. Otherwise, False is returned.

Syntax: object.Test

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/regexp.html (3 of 3) [29/07/2002 12:24:14]


DevGuru VBScript Object: TextStream

Quick References
ADO CreateObject Function
ASP
CSS2
HTML OBJECT: TextStream
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML The TextStream object provides sequential access to the contents of any file where the
WMLScript contents are in text-readable form. You can create an instance of the TextStream object using
WSH the CreateTextFile or OpenTextFile methods of the FileSystemObject object, or alternatively
XHTML by using the OpenAsTextStream method of the File object.
XML DOM
XSLT In the following code the CreateTextFile method is used on the FileSystemObject to return
Features the TextStream object, "testfile". This TextStream object is then manipulated using the
Ask DevGuru WriteLine and Close methods.
ASP Resources
HTML Color Chart Code:
Find the Bug <%
Knowledge Base Dim filesys, testfile
Links Set filesys = CreateObject("Scripting.FileSystemObject")
Tips of the Week Set testfile= filesys.CreateTextFile("c:\somefile.txt", True)
T-SQL Syntax Charts testfile.WriteLine "Your text goes here."
Tutorials testfile.Close
Products %>
dgCalendar
Every instance of a TextStream object has an internal pointer that points to a specific place in
dgCharge
the file. When first opening the stream, this pointer is positioned at the first character in the file.
dgChart
The pointer will then move around as you manipulate the TextStream object using its methods
dgEncrypt
and properties.
dgFileUpload
dgReport
dgSort PROPERTIES
dgTree
Site AtEndOfLine Property
Authoring Returns a Boolean value. If the file pointer is positioned immediately before the file's end-of-line
Coming Soon marker, the value is True, and False otherwise.
DevGuru Resume
Errata Syntax: object.AtEndOfLine
Link to Us
Merchandise AtEndOfStream Property
Sponsorships Returns a Boolean value. If the file pointer is positioned at the end of a file, the value is True,
Testimonials and False otherwise.

http://www.devguru.com/Technologies/vbscript/quickref/textstream.html (1 of 3) [29/07/2002 12:24:17]


DevGuru VBScript Object: TextStream

What's New
Partners Syntax: object.AtEndOfStream
Code Project
DevelopersDex
Column Property
Prog. Heaven Returns the current position of the file pointer within the current line. Column 1 is the first
Tek-Tips Forum character in each line.
TopXML
VBXML.COM Syntax: object.Column
VisualBuilder.com
W3Schools
Line Property
XMLPitstop This property returns the current line number in a text file.
ZVON.org
Search Us! Syntax: object.Line

METHODS

Close Method
Closes a currently open TextStream file.

Syntax: object.Close

Read Method
This method reads the number of characters you specify from a Textstream file and returns
them as a string.

Syntax: object.Read(characters)

ReadAll Method
This method reads the entire contents of a text file and returns it as a string.

Syntax: object.ReadAll

ReadLine Method
Reads a single line (excluding the newline character) from a TextStream file and returns the
contents as a string.

Syntax: object.ReadLine

Skip Method
Causes the file pointer to skip a specified number of characters when reading a TextStream
file. Can be a positive or negative number.

Syntax: object.Skip(characters)

SkipLine Method
Moves the file pointer from its current position to the beginning of the next line.

Syntax: object.SkipLine

Write Method
This method writes a supplied string to an open TextStream file.

Syntax: object.Write(string)

WriteLine Method
Writes a supplied string to a TextStream file, followed by a new line character.

http://www.devguru.com/Technologies/vbscript/quickref/textstream.html (2 of 3) [29/07/2002 12:24:17]


DevGuru VBScript Object: TextStream

Syntax: object.WriteLine([string])

WriteBlankLines Method
Used to write a number of consecutive newline characters (defined with the lines parameter) to
a TextStream file.

Syntax: object.WriteBlankLines(lines)

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream.html (3 of 3) [29/07/2002 12:24:17]


DevGuru VBScript Method: Dictionary.Add

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Dictionary.Add
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Add keyvalue, itemvalue
WMLScript
WSH The Add method is used to add a new key/item pair to a Dictionary object. Be aware
XHTML that an error will occur if the key already exists.
XML DOM
XSLT The following example adds several key/item pairs to a Dictionary object called
Features 'guitars'.
Ask DevGuru
ASP Resources
Code:
HTML Color Chart
<%
Find the Bug dim guitars
Knowledge Base set guitars=CreateObject("Scripting.Dictionary")
Links guitars.Add "e", "Epiphone"
Tips of the Week guitars.Add "f", "Fender"
T-SQL Syntax Charts guitars.Add "g", "Gibson"
Tutorials guitars.Add "h", "Harmony"
%>
Products
dgCalendar
Output:
dgCharge
"Epiphone"
dgChart
"Fender"
dgEncrypt
"Gibson"
dgFileUpload
"Harmony"
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_add.html (1 of 2) [29/07/2002 12:24:19]


DevGuru VBScript Method: Dictionary.Add

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_add.html (2 of 2) [29/07/2002 12:24:19]


DevGuru VBScript Method: Folders Collection.Add

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Folders Collection.Add
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Add ("foldername")
WMLScript
WSH This method is used to add a new Folder to a Folders collection. Note that, if the
XHTML ("foldername") already exists, you will get an error.
XML DOM
XSLT <%
Features Code:
Dim filesys, demofolder, folcoll
Ask DevGuru
ASP Resources
Set filesys = CreateObject("Scripting.FileSystemObject")
HTML Color Chart
Set demofolder = filesys.GetFolder("foldername")
Find the Bug
Set folcoll = demofolder.SubFolders
Knowledge Base folcoll.Add("foldername")
Links %>
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/foldercoll_add.html (1 of 2) [29/07/2002 12:24:21]


DevGuru VBScript Method: Folders Collection.Add

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/foldercoll_add.html (2 of 2) [29/07/2002 12:24:21]


DevGuru VBScript Method: FileSystemObject.BuildPath

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.BuildPath
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML [newfullpath = ]object.BuildPath(path, name)
WMLScript
WSH This method is used to append a name onto an existing path. The format of the new
XHTML path is 'existingpath\name'.
XML DOM
XSLT Code:
Features <%
dim filesys, newfullpath
Ask DevGuru
set filesys=CreateObject("Scripting.FileSystemObject")
ASP Resources
newfullpath = filesys.BuildPath(c:\inetpub\wwwroot, "images")
HTML Color Chart
Find the Bug
%>
Knowledge Base
Links
Output:
Tips of the Week "c:\inetpub\wwwroot\images"
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_buildpath.html (1 of 2) [29/07/2002 12:24:23]


DevGuru VBScript Method: FileSystemObject.BuildPath

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_buildpath.html (2 of 2) [29/07/2002 12:24:23]


DevGuru VBScript Method: TextStream.Close

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: TextStream.Close
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Close
WMLScript
WSH This method is used to close a currently open TextStream file.
XHTML
XML DOM Code:
XSLT <%
Features Dim filesys, testfile
Set filesys = CreateObject("Scripting.FileSystemObject")
Ask DevGuru
Set testfile= filesys.CreateTextFile("c:\somefile.txt", True)
ASP Resources
HTML Color Chart
testfile.WriteLine("Your text goes here.")
Find the Bug
testfile.Close
Knowledge Base
%>
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_close.html (1 of 2) [29/07/2002 12:24:25]


DevGuru VBScript Method: TextStream.Close

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_close.html (2 of 2) [29/07/2002 12:24:25]


DevGuru VBScript Method: File.Copy

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: File.Copy
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML object.Copy destination[, overwrite]
WMLScript
WSH This method makes a copy of the selected file and saves it to the specified destination. The
XHTML overwrite parameter is a Boolean value - True allows existing files with the same name as
XML DOM destination to be overwritten while False (the default) does not.
XSLT
Features Note that after copying a file to a new location the File object still relates to the original file.
Ask DevGuru
Code:
ASP Resources
<%
HTML Color Chart
dim filesys, demofile
Find the Bug
set filesys = CreateObject ("Scripting.FileSystemObject")
Knowledge Base
set demofile = filesys.CreateTextFile ("c:\somefile.txt", true)
Links
set demofile = filesys.GetFile("c:\somefile.txt")
Tips of the Week
T-SQL Syntax Charts
demofile.Copy("c:\projects\someotherfile.txt")
Tutorials
%>
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/file_copy.html (1 of 2) [29/07/2002 12:24:27]


DevGuru VBScript Method: File.Copy

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/file_copy.html (2 of 2) [29/07/2002 12:24:27]


DevGuru VBScript Method: Folder.Copy

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Folder.Copy
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Copy destination[, overwrite]
WMLScript
WSH This method makes a copy of the selected folder and saves it to the specified destination. The
XHTML overwrite parameter is a Boolean value - True allows existing folders with the same name as
XML DOM destination to be overwritten while False (the default) does not.
XSLT
Features Note that after copying a folder to a new location the Folder object still relates to the original
folder.
Ask DevGuru
ASP Resources
Code:
HTML Color Chart
<%
Find the Bug
dim filesys, demofolder
Knowledge Base
set filesys = CreateObject ("Scripting.FileSystemObject")
Links
set demofolder = filesys.GetFolder("c:\projects\")
Tips of the Week
T-SQL Syntax Charts
demofolder.Copy("c:\work\")
Tutorials
%>
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/folder_copy.html (1 of 2) [29/07/2002 12:24:29]


DevGuru VBScript Method: Folder.Copy

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/folder_copy.html (2 of 2) [29/07/2002 12:24:29]


DevGuru VBScript Method: FileSystemObject.CopyFolder

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.CopyFolder
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.CopyFolder source, destination [, overwrite]
WMLScript
WSH This method lets us copy one or more folders, and all contents, from one location ( the source)
XHTML to another (destination). Wildcards can be used within the source string, providing it is the last
XML DOM component in the path, to enable the copying of multiple files, but cannot be used in the
XSLT destination string. Note that if the source does contain wildcards, it is automatically assumed
Features that the destination is an existing folder and any matching folders are copied to it.
Ask DevGuru
ASP Resources
The overwrite parameter is a Boolean. True allows the overwriting of existing files in the
HTML Color Chart destination, providing that the permissions on the destination allow it ( if the destination is set
Find the Bug as read-only, the CopyFolder method will fail). An overwrite setting of False prevents existing
Knowledge Base files in the destination from being overwritten.
Links
Tips of the Week
It is recommended that you use the FolderExists method when copying or moving a folder - if
T-SQL Syntax Charts a source folder doesn't exist you'll get an error.
Tutorials
Code:
Products <%
dgCalendar dim filesys
dgCharge set filesys=CreateObject("Scripting.FileSystemObject")
dgChart If filesys.FolderExists("c:\sourcefolder\website") Then
dgEncrypt filesys.CopyFolder "c:\sourcefolder\website", "c:\destfolder\"
dgFileUpload End If
dgReport
%>
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_copyfolder.html (1 of 2) [29/07/2002 12:24:31]


DevGuru VBScript Method: FileSystemObject.CopyFolder

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_copyfolder.html (2 of 2) [29/07/2002 12:24:31]


DevGuru VBScript Method: FileSystemObject.CreateFolder

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.CreateFolder
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.CreateFolderfoldername
WMLScript
WSH This method allows us to create a folder with the specified foldername.
XHTML
XML DOM If a folder already exists with the same name as you are trying to create, you will get an error.
XSLT The FolderExists method can be used to check this before creating you new folder.
Features
(Note that the "c:\DevGuru" folder must exist before you can add the "\myfolder" folder.)
Ask DevGuru
ASP Resources
Code:
HTML Color Chart
<%
Find the Bug
dim filesys, newfolder, newfolderpath
Knowledge Base
newfolderpath = "c:\DevGuru\myfolder"
Links
set filesys=CreateObject("Scripting.FileSystemObject")
Tips of the Week
T-SQL Syntax Charts
If Not filesys.FolderExists(newfolderpath) Then
Tutorials
Set newfolder = filesys.CreateFolder(newfolderpath)
Response.Write("A new folder has been created at: " & newfolderpath)
Products End If
dgCalendar %>
dgCharge
dgChart Output:
dgEncrypt "A new folder has been created at: c:\DevGuru\myfolder"
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_createfolder.html (1 of 2) [29/07/2002 12:24:33]


DevGuru VBScript Method: FileSystemObject.CreateFolder

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_createfolder.html (2 of 2) [29/07/2002 12:24:33]


DevGuru VBScript Method: FileSystemObject.CreateTextFile

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.CreateTextFile
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.CreateTextFile filename [, overwrite[, unicode]]
WMLScript
WSH This method is used to create a text file and returns a TextStreamObject that can then be
XHTML used to write to and read from the file.
XML DOM
XSLT The optional overwrite parameter returns a Boolean value - True (the default) permits
Features overwriting of existing files while False does not. The other optional parameter, unicode, is
also a Boolean. In this case, True creates a Unicode file and False (the default) creates an
Ask DevGuru
ASP Resources
AscII file.
HTML Color Chart
Find the Bug Code:
Knowledge Base <%
Links dim filesys, filetxt, getname, path
Tips of the Week Set filesys = CreateObject("Scripting.FileSystemObject")
T-SQL Syntax Charts Set filetxt = filesys.CreateTextFile("c:\somefile.txt", True)
Tutorials path = filesys.GetAbsolutePathName("c:\somefile.txt")
getname = filesys.GetFileName(path)
Products
filetxt.WriteLine("Your text goes here.")
dgCalendar
filetxt.Close
dgCharge
If filesys.FileExists(path) Then
dgChart
Response.Write ("Your file, '" & getname & "', has been created.")
dgEncrypt
End If
dgFileUpload
dgReport
%> Output:
dgSort
"Your file, 'somefile.txt', has been created."
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_createTextFile.html (1 of 2) [29/07/2002 12:24:35]


DevGuru VBScript Method: FileSystemObject.CreateTextFile

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_createTextFile.html (2 of 2) [29/07/2002 12:24:35]


DevGuru VBScript Method: Folder.CreateTextFile

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Folder.CreateTextFile
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.CreateTextFile filename [, overwrite[, unicode]]
WMLScript
WSH This method is used to create a text file and returns a TextStreamObject that can then be
XHTML used to write to and read from the file.
XML DOM
XSLT The optional overwrite parameter returns a Boolean value - True (the default) permits
Features overwriting of existing files while False does not. The other optional parameter, unicode, is
also a Boolean. In this case, True creates a Unicode file and False (the default) creates an
Ask DevGuru
ASP Resources
AscII file.
HTML Color Chart
Find the Bug This example creates a text file called, somefile.txt, with the following path:
Knowledge Base c:\projects\demofolder\somefile.txt
Links
Tips of the Week Code:
T-SQL Syntax Charts <%
Tutorials dim filesys, demofolder, filetxt
Set filesys = CreateObject("Scripting.FileSystemObject")
Products
Set demofolder = filesys.GetFolder("c:\projects\")
dgCalendar
Set filetxt = demofolder.CreateTextFile("somefile.txt", True)
dgCharge
filetxt.WriteLine("Your text goes here.")
dgChart
filetxt.Close
dgEncrypt
%>
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/folder_createtxtfile.html (1 of 2) [29/07/2002 12:24:37]


DevGuru VBScript Method: Folder.CreateTextFile

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/folder_createtxtfile.html (2 of 2) [29/07/2002 12:24:37]


DevGuru VBScript Method: File.Delete

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: File.Delete
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML object.Delete [force]
WMLScript
WSH The method used to delete the file relating to the specified File object. The force parameter is
XHTML a Boolean value - True allows the deletion of read-only files while False (the default) does not.
XML DOM
XSLT Note that trying to delete a file that doesn't exist will cause an error.
Features Code:
Ask DevGuru
<%
ASP Resources
dim filesys, demofile
HTML Color Chart
set filesys = CreateObject ("Scripting.FileSystemObject")
Find the Bug
set demofile = filesys.CreateTextFile ("c:\somefile.txt", true)
Knowledge Base
set demofile = filesys.GetFile("c:\somefile.txt")
Links
demofile.Delete
Tips of the Week
%>
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/file_delete.html (1 of 2) [29/07/2002 12:24:39]


DevGuru VBScript Method: File.Delete

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/file_delete.html (2 of 2) [29/07/2002 12:24:39]


DevGuru VBScript Method: Folder.Delete

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Folder.Delete
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Delete [force]
WMLScript
WSH The method used to delete the folder (and any contents) relating to the specified Folder object.
XHTML The force parameter is a Boolean value - True allows the deletion of read-only folders while
XML DOM False (the default) does not.
XSLT
Features Note that trying to delete a folder that doesn't exist will cause an error.
Ask DevGuru
Code:
ASP Resources
<%
HTML Color Chart
dim filesys, demofolder
Find the Bug
set filesys = CreateObject ("Scripting.FileSystemObject")
Knowledge Base
set demofolder = filesys.GetFolder("c:\projects\")
Links
demofolder.Delete
Tips of the Week
T-SQL Syntax Charts
%>
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/folder_delete.html (1 of 2) [29/07/2002 12:24:41]


DevGuru VBScript Method: Folder.Delete

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/folder_delete.html (2 of 2) [29/07/2002 12:24:41]


DevGuru VBScript Method: FileSystemObject.DeleteFile

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.DeleteFile
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.DeleteFile file [, force]
WMLScript
WSH This method is used to delete a specified file or files (using wildcards). The optional force
XHTML parameter returns a Boolean value - True allows files with read-only attributes to be deleted,
XML DOM while False (default) does not. Trying to delete a read-only file without setting force to True will
XSLT return an error.
Features
Note that an error also occurs if you try to delete a file that doesn't exist.
Ask DevGuru
ASP Resources
Code:
HTML Color Chart
<%
Find the Bug
dim filesys
Knowledge Base
Set filesys = CreateObject("Scripting.FileSystemObject")
Links
filesys.CreateTextFile "c:\somefile.txt", True
Tips of the Week
T-SQL Syntax Charts
If filesys.FileExists("c:\somefile.txt") Then
Tutorials
filesys.DeleteFile "c:\somefile.txt"
Response.Write("File deleted")
Products End If
dgCalendar %>
dgCharge
dgChart Output:
dgEncrypt
"File deleted"
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_deletefile.html (1 of 2) [29/07/2002 12:24:43]


DevGuru VBScript Method: FileSystemObject.DeleteFile

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_deletefile.html (2 of 2) [29/07/2002 12:24:43]


DevGuru VBScript Method: FileSystemObject.DeleteFolder

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.DeleteFolder
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.DeleteFolder folder [, force]
WMLScript
WSH This method is used to delete a specified folder or folders (using wildcards), including all of its
XHTML subfolders and files. The optional force parameter returns a Boolean value - True allows
XML DOM folders with read-only attributes to be deleted, while False (default) does not.
XSLT
Features Note that an error also occurs if you try to delete a folder that doesn't exist.
Ask DevGuru
Code:
ASP Resources
<%
HTML Color Chart
dim filesys
Find the Bug
Set filesys = CreateObject("Scripting.FileSystemObject")
Knowledge Base
If filesys.FolderExists("c:\DevGuru\website\") Then
Links
filesys.DeleteFolder "c:\DevGuru\website"
Tips of the Week
Response.Write("Folder deleted")
T-SQL Syntax Charts
Tutorials
End If
%>
Products
dgCalendar Output:
dgCharge "Folder deleted"
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_deletefolder.html (1 of 2) [29/07/2002 12:24:45]


DevGuru VBScript Method: FileSystemObject.DeleteFolder

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_deletefolder.html (2 of 2) [29/07/2002 12:24:45]


DevGuru VBScript Method: FileSystemObject.DriveExists

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.DriveExists
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.DriveExists(drive)
WMLScript
WSH This method lets us check if a specified drive exists. It returns a Boolean value - True if the
XHTML drive does exist and False if it doesn't. Note that with removable media drives the DriveExists
XML DOM method always returns a True value. When accessing this type of drive, use the IsReady
XSLT method to determine the drive's status.
Features
Code:
Ask DevGuru
ASP Resources
<%
HTML Color Chart
dim filesys
Find the Bug Set filesys = CreateObject("Scripting.FileSystemObject")
Knowledge Base If filesysDriveExists(drive) Then
Links Response.Write("The specified drive does exist.")
Tips of the Week End If
T-SQL Syntax Charts %>
Tutorials
Output:
Products
"The specified drive does exist"
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_driveexists.html (1 of 2) [29/07/2002 12:24:47]


DevGuru VBScript Method: FileSystemObject.DriveExists

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_driveexists.html (2 of 2) [29/07/2002 12:24:47]


DevGuru VBScript Method: object.Execute

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: object.Execute
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML object.Execute (TargetString)
WMLScript
WSH The Execute method is used with a RegExp object variable to look for a search string pattern
XHTML (also known as a regular expression) inside a target string.
XML DOM
XSLT There is one mandatory argument, the target string to be searched. The search string pattern
Features (regular expression) is declared using the Pattern property.
Ask DevGuru
ASP Resources Each time a match is made (i.e., the search pattern is found inside the target string), a Match
HTML Color Chart object is created and added to a Matches collection. Note that a match does not have to occur.
Find the Bug Therefore the Execute method can return a Matches collection that is empty, or that contains
Knowledge Base one or more, objects.
Links
Tips of the Week Code:
T-SQL Syntax Charts <%
Tutorials 'this sub finds the matches
Products Sub RegExpTest(strMatchPattern, strPhrase)
dgCalendar 'create variables
dgCharge Dim objRegEx, Match, Matches, StrReturnStr
dgChart 'create instance of RegExp object
dgEncrypt Set objRegEx = New RegExp
dgFileUpload
dgReport 'set the pattern
dgSort objRegEx.Pattern = strMatchPattern
dgTree
Site 'create the collection of matches
Authoring Set Matches = objRegEx.Execute(strPhrase)
Coming Soon
DevGuru Resume 'print out all matches
Errata For Each Match in Matches
Link to Us strReturnStr = "Match found at position "
Merchandise strReturnStr = strReturnStr & Match.FirstIndex & ". Match Value is `"
Sponsorships strReturnStr = strReturnStr & Match.value & "'."
Testimonials 'print

http://www.devguru.com/Technologies/vbscript/quickref/RegExp_Execute.html (1 of 2) [29/07/2002 12:24:49]


DevGuru VBScript Method: object.Execute

What's New Response.Write(strReturnStr & "<BR>")


Partners Next
Code Project End Sub
DevelopersDex
Prog. Heaven 'call the subroutine
Tek-Tips Forum RegExpTest "is.", "Is1 is2 Is3 is4"
TopXML %>
VBXML.COM
VisualBuilder.com Output:
W3Schools Match found at position 4. Match Value is `is2'.
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/RegExp_Execute.html (2 of 2) [29/07/2002 12:24:49]


DevGuru VBScript Method: Dictionary.Exists

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Dictionary.Exists
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Exists (keyvalue)
WMLScript
WSH The Exists method is used to determine whether a key already exists in the specified
XHTML Dictionary. Returns True if it does and False otherwise.
XML DOM
XSLT The following code uses the Exists method to see if the key with the value of 'g' exists in the
Features Dictionary object and, if it does, changes its corresponding item value.
Ask DevGuru
ASP Resources
Code:
HTML Color Chart <%
Find the Bug dim guitars
Knowledge Base set guitars=CreateObject("Scripting.Dictionary")
Links guitars.Add "e", "Epiphone"
Tips of the Week guitars.Add "f", "Fender"
T-SQL Syntax Charts guitars.Add "g", "Gibson"
Tutorials guitars.Add "h", "Harmony"
If guitars.Exists("g") Then
Products
guitars.Item("g") = "Guild"
dgCalendar
End If
dgCharge
%>
dgChart
dgEncrypt
dgFileUpload
Output:
dgReport
"Epiphone"
dgSort
"Fender"
dgTree "Guild"
"Harmony"
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_exists.html (1 of 2) [29/07/2002 12:24:50]


DevGuru VBScript Method: Dictionary.Exists

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_exists.html (2 of 2) [29/07/2002 12:24:50]


DevGuru VBScript Method: FileSystemObject.FileExists

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.FileExists
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.FileExists(file)
WMLScript
WSH This method lets us check if a specified file exists. It returns a Boolean value - True if the file
XHTML does exist and False if it doesn't. Note that if the file that you are checking for isn't in the
XML DOM current directory, you must supply the complete path.
XSLT
Features In the following example the FileExists method is used to check for a specific file before
deleting it.
Ask DevGuru
ASP Resources
Code:
HTML Color Chart
<%
Find the Bug
dim filesys
Knowledge Base
Set filesys = CreateObject("Scripting.FileSystemObject")
Links
filesys.CreateTextFile "c:\somefile.txt", True
Tips of the Week
T-SQL Syntax Charts
If filesys.FileExists("c:\somefile.txt") Then
Tutorials
filesys.DeleteFile "c:\somefile.txt"
Response.Write("File deleted")
Products End If
dgCalendar %>
dgCharge
dgChart Output:
dgEncrypt
"File deleted"
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_fileexists.html (1 of 2) [29/07/2002 12:24:52]


DevGuru VBScript Method: FileSystemObject.FileExists

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_fileexists.html (2 of 2) [29/07/2002 12:24:52]


DevGuru VBScript Method: FileSystemObject.FolderExists

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.FolderExists
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.FolderExists(folder)
WMLScript
WSH This method allows us check if a specified folder exists. It returns a Boolean value - True if the
XHTML folder does exist and False if it doesn't. Note that if the folder that you are checking for isn't a
XML DOM subfolder of the current folder, you must supply the complete path.
XSLT
Features In the following example the FolderExists method is used before creating a new folder to
check that it doesn't already exist.
Ask DevGuru
ASP Resources
Code:
HTML Color Chart
<%
Find the Bug
dim filesys, newfolder
Knowledge Base
set filesys=CreateObject("Scripting.FileSystemObject")
Links
If Not filesys.FolderExists("c:\DevGuru\website\") Then
Tips of the Week
T-SQL Syntax Charts
newfolder = filesys.CreateFolder "c:\DevGuru\website\"
Tutorials
Response.Write("A new folder '" & newfolder & "' has been created")
End If
Products %>
dgCalendar
dgCharge Output:
dgChart "A new folder 'c:\DevGuru\website\' has been created."
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_folderexists.html (1 of 2) [29/07/2002 12:24:54]


DevGuru VBScript Method: FileSystemObject.FolderExists

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_folderexists.html (2 of 2) [29/07/2002 12:24:54]


DevGuru VBScript Method: FileSystemObject.GetAbsolutePathName

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetAbsolutePathName
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetAbsolutePathName(path)
WMLScript
WSH This method returns the complete path from the root of the drive for the
XHTML specified path string.
XML DOM
XSLT The following examples assume that the current directory is c:\DevGuru\website
Features Code:
<%
Ask DevGuru
dim filesys, pathstring
ASP Resources
set filesys=CreateObject("Scripting.FileSystemObject")
HTML Color Chart
Find the Bug
pathstring = filesys.GetAbsolutePathName("c:") %>
Knowledge Base
Output:
Links
"c:\DevGuru\website"
Tips of the Week
T-SQL Syntax Charts
Code:
Tutorials
<%
Products dim filesys, pathstring
dgCalendar set filesys=CreateObject("Scripting.FileSystemObject")
dgCharge pathstring = filesys.GetAbsolutePathName("VBScript.html")
dgChart %>
dgEncrypt
dgFileUpload Output:
dgReport "c:\DevGuru\website\VBScript.html"
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getabsolute.html (1 of 2) [29/07/2002 12:24:56]


DevGuru VBScript Method: FileSystemObject.GetAbsolutePathName

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getabsolute.html (2 of 2) [29/07/2002 12:24:56]


DevGuru VBScript Method: FileSystemObject.GetBaseName

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetBaseName
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetBaseName(path)
WMLScript
WSH This method allows us to get the base name of a file or folder in the specified path. The
XHTML returned string contains only the base name of the file, without any extension.
XML DOM
XSLT Note that this method doesn't check the existance or the validity of the supplied path.
Features Code:
Ask DevGuru <%
ASP Resources
dim filesys, a
HTML Color Chart
Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug
filesys.CreateTextFile "c:\DevGuru\website\VBScript.txt", True
Knowledge Base
a = filesys.GetBaseName("c:\DevGuru\website\VBScript.txt")
Links
Response.Write (a)
Tips of the Week
%>
T-SQL Syntax Charts
Tutorials
Output:
Products "VBScript"
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getbasename.html (1 of 2) [29/07/2002 12:24:58]


DevGuru VBScript Method: FileSystemObject.GetBaseName

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getbasename.html (2 of 2) [29/07/2002 12:24:58]


DevGuru VBScript Method: FileSystemObject.GetDrive

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetDrive
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetDrive(drivename)
WMLScript
WSH This method returns the drive object that is specified by the drivename
XHTML argument.
XML DOM
XSLT The drivename argument must be in an accepted format:
Features A drive letter such as, c
Ask DevGuru A drive letter with a colon such as, c:
ASP Resources A drive letter with a colon and a path such as, c:\hisfolder\herfile
HTML Color Chart
Find the Bug You also may use the GetDriveName method to obtain the drivename
Knowledge Base argument.
Links
Tips of the Week If the drive does not exist or the format is not correct, the GetDrive method will
T-SQL Syntax Charts return an error.
Tutorials
Code:
Products
<%
dgCalendar
dim filesys, name, DriveObject
dgCharge
Set filesys = CreateObject("Scripting.FileSystemObject")
dgChart
name = filesys.GetDriveName("c:\DevGuru\website\VBScript.txt")
dgEncrypt
dgFileUpload
Set DriveObject = filesys.GetDrive("c:\DevGuru\website\VBScript.txt")
dgReport
Response.Write(name)
dgSort
%>
dgTree
Output:
Site "c:"
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getdrive.html (1 of 2) [29/07/2002 12:25:00]


DevGuru VBScript Method: FileSystemObject.GetDrive

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getdrive.html (2 of 2) [29/07/2002 12:25:00]


DevGuru VBScript Method: FileSystemObject.GetDriveName

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetDriveName
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetDriveName(path)
WMLScript
WSH This method returns a string that contains the drive name in the specified path. If the drive
XHTML cannot be determined the GetDriveName method will return an empty string.
XML DOM
XSLT Note that this method doesn't check the existance or the validity of the supplied path.
Features Code:
Ask DevGuru
<%
ASP Resources
dim filesys, a
HTML Color Chart
Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug
a = filesys.GetDriveName("c:\DevGuru\website\VBScript.txt")
Knowledge Base
Response.Write (a)
Links
%>
Tips of the Week
T-SQL Syntax Charts
Tutorials
Output:
"c:"
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getdrvname.html (1 of 2) [29/07/2002 12:25:02]


DevGuru VBScript Method: FileSystemObject.GetDriveName

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getdrvname.html (2 of 2) [29/07/2002 12:25:02]


DevGuru VBScript Method: FileSystemObject.GetExtensionName

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetExtensionName
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetExtensionName(path)
WMLScript
WSH Used to return a string containing the extension name of the last component in a supplied path.
XHTML If no component matches the supplied path string the GetExtensionName method will return
XML DOM an empty string.
XSLT
Features Code:
<%
Ask DevGuru
dim filesys, a
ASP Resources
HTML Color Chart
Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug
filesys.CreateTextFile "c:\DevGuru\website\VBScript.txt", True
Knowledge Base
a = filesys.GetExtensionName("c:\DevGuru\website\VBScript.txt")
Links Response.Write (a)
Tips of the Week %>
T-SQL Syntax Charts
Tutorials Output:
"txt"
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getextname.html (1 of 2) [29/07/2002 12:25:04]


DevGuru VBScript Method: FileSystemObject.GetExtensionName

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getextname.html (2 of 2) [29/07/2002 12:25:04]


DevGuru VBScript Method: FileSystemObject.GetFile

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetFile
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetFile (filename)
WMLScript
WSH This method is used to get the File object for the path that you specify. You can then use the
XHTML new variable containing the file object to access its various methods and properties. The
XML DOM following code demonstrates this by returning the date the file was created and displaying the
XSLT details in the browser.
Features
Ask DevGuru Code:
ASP Resources <%
HTML Color Chart dim filesys, filetxt, f
Find the Bug Set filesys = CreateObject("Scripting.FileSystemObject")
Knowledge Base Set filetxt = filesys.CreateTextFile("c:\somefile.txt", true)
Links Set f = filesys.GetFile("C:\somefile.txt")
Tips of the Week Response.Write ("Your file was created on " & f.DateCreated)
T-SQL Syntax Charts %>
Tutorials
Products Output:
"Your file was created on 5/21/99 2:07:21 PM"
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getfile.html (1 of 2) [29/07/2002 12:25:05]


DevGuru VBScript Method: FileSystemObject.GetFile

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getfile.html (2 of 2) [29/07/2002 12:25:05]


DevGuru VBScript Method: FileSystemObject.GetFileName

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetFileName
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetFileName(path)
WMLScript
WSH This method is used to return the name of the last file or folder of the supplied path. If the
XHTML supplied path string doesn't end with the specified file or folder the GetFileName method will
XML DOM return an empty string.
XSLT
Features Note that this method doesn't check the existance or the validity of the supplied path.
Ask DevGuru
Code:
ASP Resources
<%
HTML Color Chart
dim filesys, a
Find the Bug
Set filesys = CreateObject("Scripting.FileSystemObject")
Knowledge Base
filesys.CreateTextFile "c:\DevGuru\website\VBScript.txt", True
Links
a = filesys.GetFileName("c:\DevGuru\website\VBScript.txt")
Tips of the Week
Response.Write (a)
T-SQL Syntax Charts
Tutorials
%>

Products Output:
dgCalendar "VBScript.txt"
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getfilename.html (1 of 2) [29/07/2002 12:25:07]


DevGuru VBScript Method: FileSystemObject.GetFileName

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getfilename.html (2 of 2) [29/07/2002 12:25:07]


DevGuru VBScript Method: FileSystemObject.GetFolder

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetFolder
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetFolder (foldername)
WMLScript
WSH This method is used to get the Folder object for the path that you specify. You can than use
XHTML the new variable containing the folder object to access its various methods and properties. The
XML DOM following code demonstrates this by returning the date the folder was created and displaying
XSLT the details in the browser.
Features
Ask DevGuru Code:
ASP Resources <%
HTML Color Chart dim filesys, f
Find the Bug Set filesys = CreateObject("Scripting.FileSystemObject")
Knowledge Base Set f = filesys.GetFolder("C:\TestFolder\")
Links Response.Write ("Your folder was created on " & f.DateCreated)
Tips of the Week %>
T-SQL Syntax Charts
Tutorials Output:
Products "Your folder was created on (date created goes here)."
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getfolder.html (1 of 2) [29/07/2002 12:25:09]


DevGuru VBScript Method: FileSystemObject.GetFolder

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getfolder.html (2 of 2) [29/07/2002 12:25:09]


DevGuru VBScript Method: FileSystemObject.GetParentFolderName

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetParentFolderName
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetParentFolderName(path)
WMLScript
WSH Used to return a string containing the parent folder name of the last component in a supplied
XHTML path. If no component matches the supplied path string the GetParentFolderName method will
XML DOM return an empty string.
XSLT
Features Note that this method doesn't check the existance or the validity of the supplied path.
Ask DevGuru
Code:
ASP Resources
<%
HTML Color Chart
dim filesys, a
Find the Bug
Set filesys = CreateObject("Scripting.FileSystemObject")
Knowledge Base
a = filesys.GetParentFolderName("c:\DevGuru\website\VBScript.txt")
Links
Response.Write (a)
Tips of the Week
%>
T-SQL Syntax Charts
Tutorials
Output:
Products "website\"
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getparfolname.html (1 of 2) [29/07/2002 12:25:11]


DevGuru VBScript Method: FileSystemObject.GetParentFolderName

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getparfolname.html (2 of 2) [29/07/2002 12:25:11]


DevGuru VBScript Method: FileSystemObject.GetSpecialFolder

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetSpecialFolder
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetSpecialFolder (foldername)
WMLScript
WSH This method is used to get the path for one of Windows' special folders. These
XHTML folders are:
XML DOM
XSLT 0 - WindowsFolder, containing the files installed by the operating system.
Features
1 - SystemFolder, containing fonts, libraries and device drivers required by the
Ask DevGuru
operating system.
ASP Resources
HTML Color Chart
2 - TemporaryFolder, used to store temporary (.TMP) files.
Find the Bug
Knowledge Base
Code:
Links
<%
Tips of the Week
dim filesys, f
T-SQL Syntax Charts
Set filesys = CreateObject("Scripting.FileSystemObject")
Tutorials
Set f = filesys.GetSpecialFolder(1)
Products Response.Write ("The path to your System folder is '" & f & "'." )
dgCalendar %>
dgCharge
dgChart Output:
dgEncrypt "The path to your System folder is 'C:\WINNT\system32'."
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getspecfolder.html (1 of 2) [29/07/2002 12:25:13]


DevGuru VBScript Method: FileSystemObject.GetSpecialFolder

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_getspecfolder.html (2 of 2) [29/07/2002 12:25:13]


DevGuru VBScript Method: FileSystemObject.GetTempName

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.GetTempName
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.GetTempName
WMLScript
WSH This method is used to generate a random filename to use for a temporary file. It does not
XHTML create a temporary file, but is used in conjunction with the CreateTextFile method when a
XML DOM temporary file is required.
XSLT
Features Code:
Ask DevGuru <%
ASP Resources Dim filesys, tempname, tempfolder, tempfile
HTML Color Chart Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug Set tempfolder = filesys.GetSpecialFolder(2)
Knowledge Base tempname = filesys.GetTempName
Links Set tempfile = tempfolder.CreateTextFile(tempname)
Tips of the Week Response.Write ("The temporary file, '" & tempfile & "', has been created")
T-SQL Syntax Charts %>
Tutorials
Output:
Products "The temporary file, 'rad80F30.tmp', has been created."
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_gettempname.html (1 of 2) [29/07/2002 12:25:15]


DevGuru VBScript Method: FileSystemObject.GetTempName

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_gettempname.html (2 of 2) [29/07/2002 12:25:15]


DevGuru VBScript Method: Dictionary.Items

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Dictionary.Items
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML [arrayname = ] object. Items
WMLScript
WSH
XHTML The Items method can be used to retreive all the items in a Dictionary object
XML DOM and place them in an array. We can then iterate through the items using a For....Next
XSLT loop.
Features
The following code demonstrates this, using the Dictionary object's Count property
Ask DevGuru
ASP Resources
to determine the amount of key/item pairs.
HTML Color Chart
Code:
Find the Bug
<%
Knowledge Base
dim guitars, arrayItems, i
Links
set guitars=CreateObject("Scripting.Dictionary")
Tips of the Week
T-SQL Syntax Charts
guitars.Add "e", "Epiphone"
Tutorials
guitars.Add "f", "Fender"
guitars.Add "g", "Gibson"
Products guitars.Add "h", "Harmony"
dgCalendar arrayItems = guitars.Items
dgCharge for i = 0 to guitars.Count -1
dgChart Response.Write "<br>" & arrayItems(i)
dgEncrypt
next
dgFileUpload
%>
dgReport
dgSort Output:
dgTree "Epiphone"
Site "Fender"
Authoring "Gibson"
Coming Soon "Harmony"
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_items.html (1 of 2) [29/07/2002 12:25:17]


DevGuru VBScript Method: Dictionary.Items

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_items.html (2 of 2) [29/07/2002 12:25:17]


DevGuru VBScript Method: Dictionary.Keys

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Dictionary.Keys
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML [arrayname = ] object. Keys
WMLScript
WSH
XHTML The Keys method can be used to retreive all the keys in a Dictionary object
XML DOM and place them in an array. We can then iterate through the keys using a For....Next
XSLT loop.
Features
The following code demonstrates this, using the Dictionary object's Count property
Ask DevGuru
ASP Resources
to determine the amount of key/item pairs.
HTML Color Chart
Code:
Find the Bug
<%
Knowledge Base
dim guitars, arrayKeys, i
Links
set guitars=CreateObject("Scripting.Dictionary")
Tips of the Week
T-SQL Syntax Charts
guitars.Add "e", "Epiphone"
Tutorials
guitars.Add "f", "Fender"
guitars.Add "g", "Gibson"
Products guitars.Add "h", "Harmony"
dgCalendar arrayItems = guitars.Keys
dgCharge for i = 0 to guitars.Count -1
dgChart Response.Write "<br>Key = " & arrayItems(i) & "Item = " & _
dgEncrypt
guitars.Item(arrayKeys(i))
dgFileUpload
next
dgReport
%>
dgSort
dgTree
Output:
Site "Key = e Item = Epiphone"
Authoring "Key = f Item = Fender"
Coming Soon "Key = g Item = Gibson"
DevGuru Resume "Key = h Item = Harmony"
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_keys.html (1 of 2) [29/07/2002 12:25:19]


DevGuru VBScript Method: Dictionary.Keys

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_keys.html (2 of 2) [29/07/2002 12:25:19]


DevGuru VBScript Method: File.Move

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: File.Move
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML object.Move destination
WMLScript
WSH This method is used to move the file relating to the specified File object to a new destination.
XHTML
XML DOM It is recommended that you use the FileExists method of the FileSystemObject object to
XSLT determine if a file with the same name already exists in the destination location. If it does, and
Features you attempt the Move, you'll receive an error.
Ask DevGuru
Code:
ASP Resources
<%
HTML Color Chart
dim filesys, demofile
Find the Bug
set filesys = CreateObject ("Scripting.FileSystemObject")
Knowledge Base
set demofile = filesys.CreateTextFile ("c:\somefile.txt", true)
Links
set demofile = filesys.GetFile("c:\somefile.txt")
Tips of the Week
T-SQL Syntax Charts
demofile.Move ("c:\projects\test\")
Tutorials
%>
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/file_move.html (1 of 2) [29/07/2002 12:25:21]


DevGuru VBScript Method: File.Move

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/file_move.html (2 of 2) [29/07/2002 12:25:21]


DevGuru VBScript Method: Folder.Move

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Folder.Move
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Move destination
WMLScript
WSH This method is used to move the folder relating to the specified Folder object to a new
XHTML destination.
XML DOM
XSLT It is recommended that you use the FolderExists method of the FileSystemObject object to
Features determine if a folder with the same name already exists in the destination location. If it does,
and you attempt the Move, you'll receive an error.
Ask DevGuru
ASP Resources
Code:
HTML Color Chart
<%
Find the Bug
dim filesys, demofolder
Knowledge Base
set filesys = CreateObject ("Scripting.FileSystemObject")
Links
set demofolder = filesys.GetFolder("c:\projects\")
Tips of the Week
T-SQL Syntax Charts
demofolder.Move ("c:\work\")
Tutorials
%>
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/folder_move.html (1 of 2) [29/07/2002 12:25:23]


DevGuru VBScript Method: Folder.Move

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/folder_move.html (2 of 2) [29/07/2002 12:25:23]


DevGuru VBScript Method: FileSystemObject.MoveFile

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.MoveFile
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.MoveFile source, destination
WMLScript
WSH This method lets us move one or more files from one location ( the source) to another
XHTML (destination). Wildcards can be used within the source string, providing it is the last component
XML DOM in the path, to enable the moving of multiple files, but cannot be used in the destination string.
XSLT Note that if the source does contain wildcards, or if the destination ends with a back-slash
Features (path separator), it is automatically assumed that the destination is an existing folder and any
Ask DevGuru matching files are moved to it.
ASP Resources
HTML Color Chart It is recommended that you use the FileExists method when moving a file - if a source file
Find the Bug doesn't exist you'll get an error. An error also occurs if the destination is a directory or an
Knowledge Base existing file.
Links
Tips of the Week
Code:
T-SQL Syntax Charts <%
Tutorials dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
Products If filesys.FileExists("c:\sourcefolder\anyfile.html") Then
dgCalendar filesys.MoveFile "c:\sourcefolder\anyfile.html", "c:\destfolder\"
dgCharge
End If
dgChart
%>
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_movefile.html (1 of 2) [29/07/2002 12:25:25]


DevGuru VBScript Method: FileSystemObject.MoveFile

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_movefile.html (2 of 2) [29/07/2002 12:25:25]


DevGuru VBScript Method: FileSystemObject.MoveFolder

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.MoveFolder
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.MoveFolder source, destination
WMLScript
WSH This method lets us move one or more folders from one location ( the source) to another
XHTML (destination). Wildcards can be used within the source string, providing it is the last component
XML DOM in the path, to enable the moving of multiple folders, but cannot be used in the destination
XSLT string. Note that if the source does contain wildcards, or if the destination ends with a back-
Features slash (path separator), it is automatically assumed that the destination is an existing folder
Ask DevGuru and any matching folders are moved to it.
ASP Resources
HTML Color Chart It is recommended that you use the FolderExists method when moving a folder - if a source
Find the Bug folder doesn't exist you'll get an error. An error also occurs if the destination is a directory or
Knowledge Base an existing file.
Links
Tips of the Week
Code:
T-SQL Syntax Charts <%
Tutorials dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
Products If filesys.FolderExists("c:\sourcefolder\test\") Then
dgCalendar filesys.MoveFolder "c:\sourcefolder\test\", "c:\destfolder\"
dgCharge
End If
dgChart
%>
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_movefolder.html (1 of 2) [29/07/2002 12:25:27]


DevGuru VBScript Method: FileSystemObject.MoveFolder

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_movefolder.html (2 of 2) [29/07/2002 12:25:27]


DevGuru VBScript Method: File.OpenAsTextStream

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: File.OpenAsTextStream
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML object.OpenAsTextStream([iomode [, format]])
WMLScript
WSH This method opens a specified file and returns an instance of a TextStream object that can
XHTML then be manipulated - read from, written or appended to.
XML DOM
XSLT This method has two optional parameters. The first, iomode, has the following available
Features values:
Ask DevGuru
ASP Resources Constant Value Description
HTML Color Chart
Find the Bug ForReading 1 File is opened for reading only
Knowledge Base
Links File is opened for writing and the contents of any existing file
Tips of the Week
ForWriting 2
with the same name are overwritten
T-SQL Syntax Charts
Tutorials ForAppending 8 Opens the file and writes to the end of any existing text.
Products
dgCalendar
dgCharge The second optional parameter, format, can have any of the following values:
dgChart
dgEncrypt
dgFileUpload Constant Value Description
dgReport
dgSort TristateUseDefault -2 Uses the system default file format
dgTree
TristateTrue -1 Opens the file using the Unicode format
Site
Authoring TristateFalse 0 Opens the file in AscII format
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise Code:
Sponsorships <%
Testimonials dim filesys, demofile, txtstream
set filesys = CreateObject ("Scripting.FileSystemObject")

http://www.devguru.com/Technologies/vbscript/quickref/file_openastext.html (1 of 2) [29/07/2002 12:25:29]


DevGuru VBScript Method: File.OpenAsTextStream

What's New set demofile = filesys.CreateTextFile ("c:\somefile.txt", true)


Partners set demofile = filesys.GetFile("c:\somefile.txt")
Code Project set txtstream = demofile.OpenAsTextStream (2, -2)
DevelopersDex txtstream.Write "This will overwrite any text already in the file."
Prog. Heaven txtstream.Close
Tek-Tips Forum %>
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/file_openastext.html (2 of 2) [29/07/2002 12:25:29]


DevGuru VBScript Method: FileSystemObject.OpenTextFile

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.OpenTextFile
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.OpenTextFile (filename [, iomode[, create[, format]]])
WMLScript
WSH This method is used to open a text file and returns a TextStreamObject that can then be used
XHTML to write to, append to, and read from the file.
XML DOM
XSLT The optional iomode argument can have one of the following Constants as its value:
Features
Ask DevGuru CONSTANT VALUE DESCRIPTION
ASP Resources
HTML Color Chart ForReading 1 Opens a file for reading only
Find the Bug
Knowledge Base Opens a file for writing. If the file already exists, the contents are
ForWriting 2
Links overwritten.
Tips of the Week
T-SQL Syntax Charts Opens a file and starts writing at the end (appends). Contents
Tutorials ForAppending 8
are not overwritten.
Products
dgCalendar The optional create argument can be either True, which will create the specified file if it does
dgCharge not exist, or False, which won't.
dgChart
dgEncrypt The optional format argument uses one of the following Tristate values to specify in which
dgFileUpload format the file is opened. If not set, this defaults to TristateFalse, and the file will be opened in
dgReport ASCII format.
dgSort
dgTree
CONSTANT VALUE DESCRIPTION
Site
Authoring
TristateTrue -1 Opens the file as Unicode
Coming Soon
DevGuru Resume
TristateFalse 0 Opens the file as ASCII
Errata
Link to Us
TristateUseDefault -2 Use default system setting
Merchandise
Sponsorships
Testimonials The following example will open the file, "c:\somefile.txt" (or create it if it does not exist), and

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_opentextfile.html (1 of 2) [29/07/2002 12:25:31]


DevGuru VBScript Method: FileSystemObject.OpenTextFile

What's New append the specified text to it.


Partners
Code Project
DevelopersDex Code:
Prog. Heaven <%
Tek-Tips Forum dim filesys, filetxt
TopXML Const ForReading = 1, ForWriting = 2, ForAppending = 8
VBXML.COM Set filesys = CreateObject("Scripting.FileSystemObject")
VisualBuilder.com Set filetxt = filesys.OpenTextFile("c:\somefile.txt", ForAppending, True)
W3Schools filetxt.WriteLine("Your text goes here.")
XMLPitstop filetxt.Close
ZVON.org %>
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_opentextfile.html (2 of 2) [29/07/2002 12:25:31]


DevGuru VBScript Method: Err.Raise

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Err.Raise
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML object.Raise(number[, source, description, helpfile, helpcontext])
WMLScript
WSH This method is used to generate a VBScript runtime error. The arguments, with the exception
XHTML of number, are all optional. Note that if no arguments are supplied, any error values that have
XML DOM not been cleared from the Err object will automatically be inherited by the new instance of the
XSLT object.
Features
Code:
Ask DevGuru
<%
ASP Resources
HTML Color Chart
On Error Resume Next
Find the Bug
Err.Raise 8 'raise a user-defined error
Knowledge Base
Err.Description = "My Error"
Links Err.Source = "MyAppName"
Tips of the Week Response.Write "An Error of the type '" & Err.Description & "' has been_
T-SQL Syntax Charts caused by '" & Err.Source & "'."
Tutorials %>
Products Output:
dgCalendar "An Error of the type 'My Error' has caused by 'MyAppName'."
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/err_raise.html (1 of 2) [29/07/2002 12:25:33]


DevGuru VBScript Method: Err.Raise

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/err_raise.html (2 of 2) [29/07/2002 12:25:33]


DevGuru VBScript Method: Dictionary.Remove

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Dictionary.Remove
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Remove (keyvalue)
WMLScript
WSH The Remove method is used to remove a single key/item pair from the
XHTML specified Dictionary object.
XML DOM
XSLT Code:
Features <%
Ask DevGuru dim guitars
ASP Resources set guitars=CreateObject("Scripting.Dictionary")
HTML Color Chart guitars.Add "e", "Epiphone"
Find the Bug guitars.Add "f", "Fender"
Knowledge Base guitars.Add "g", "Gibson"
Links guitars.Add "h", "Harmony"
Tips of the Week guitars.Remove("g")
T-SQL Syntax Charts %>
Tutorials
Products Output:
dgCalendar
"Epiphone"
dgCharge
"Fender"
dgChart "Harmony"
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_remove.html (1 of 2) [29/07/2002 12:25:35]


DevGuru VBScript Method: Dictionary.Remove

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_remove.html (2 of 2) [29/07/2002 12:25:35]


DevGuru VBScript Method: Dictionary.RemoveAll

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: Dictionary.RemoveAll
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.RemoveAll
WMLScript
WSH The RemoveAll method is used to remove all key/item pairs from the
XHTML specified Dictionary object.
XML DOM
XSLT Code:
Features <%
Ask DevGuru dim guitars
ASP Resources set guitars=CreateObject("Scripting.Dictionary")
HTML Color Chart guitars.Add "e", "Epiphone"
Find the Bug guitars.Add "f", "Fender"
Knowledge Base guitars.Add "g", "Gibson"
Links guitars.Add "h", "Harmony"
Tips of the Week guitars.RemoveAll
T-SQL Syntax Charts guitars.Add "i", "Ibanez"
Tutorials %>
Products
dgCalendar
Output:
dgCharge
"Ibanez"
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_remove_all.html (1 of 2) [29/07/2002 12:25:37]


DevGuru VBScript Method: Dictionary.RemoveAll

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_remove_all.html (2 of 2) [29/07/2002 12:25:37]


DevGuru VBScript Method: TextStream.Read

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: TextStream.Read
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Read
WMLScript
WSH This method reads the number of characters you specify from a Textstream file and returns
XHTML them as a string. If you specify more characters than actual exist in the file, then Read only
XML DOM returns the actual number of characters that are in the file.
XSLT
Features Code:
Ask DevGuru <%
ASP Resources dim filesys, text, readfile, contents
HTML Color Chart set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug Set text = filesys.CreateTextFile("c:\somefile2.txt")
Knowledge Base text.Write "A quick example of the Read method"
Links text.close
Tips of the Week set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
T-SQL Syntax Charts contents = readfile.Read(7)
Tutorials readfile.close
Products Response.Write "The first seven characters in the text file are '" & contents & "'."
dgCalendar
%>
dgCharge
Output:
dgChart
"The first seven characters in the text file are 'A quick'.
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_read.html (1 of 2) [29/07/2002 12:25:39]


DevGuru VBScript Method: TextStream.Read

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_read.html (2 of 2) [29/07/2002 12:25:39]


DevGuru VBScript Method: TextStream.ReadAll

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: TextStream.ReadAll
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.ReadAll
WMLScript
WSH This method reads the entire contents of a text file and returns it as a
XHTML string.
XML DOM
XSLT Code:
Features <%
dim filesys, text, readfile, contents
Ask DevGuru
set filesys = CreateObject("Scripting.FileSystemObject")
ASP Resources
Set text = filesys.CreateTextFile("c:\somefile2.txt")
HTML Color Chart
Find the Bug
text.Write "A quick example of the ReadAll method"
Knowledge Base
text.close
Links
set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
Tips of the Week contents = readfile.ReadAll
T-SQL Syntax Charts readfile.close
Tutorials Response.Write "The file contains the following text - '" & contents &
"'."
Products %>
dgCalendar
dgCharge Output:
dgChart "The file contains the following text - 'A quick example of the ReadAll
dgEncrypt method'.
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_readall.html (1 of 2) [29/07/2002 12:25:41]


DevGuru VBScript Method: TextStream.ReadAll

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_readall.html (2 of 2) [29/07/2002 12:25:41]


DevGuru VBScript Method: TextStream.ReadLine

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: TextStream.ReadLine
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.ReadLine
WMLScript
WSH Reads a single line (excluding the newline character) from a TextStream file and
XHTML returns the contents as a string.
XML DOM
XSLT Code:
Features <%
dim filesys, text, readfile, contents
Ask DevGuru
set filesys = CreateObject("Scripting.FileSystemObject")
ASP Resources
HTML Color Chart
Set text = filesys.CreateTextFile("c:\somefile2.txt")
Find the Bug
text.Write "A quick example of the ReadLine method"
Knowledge Base
text.close
Links set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
Tips of the Week contents = readfile.ReadLine
T-SQL Syntax Charts readfile.close
Tutorials Response.Write "The line contains the following text - '" & contents & "'."
%>
Products
dgCalendar Output:
dgCharge "The line contains the following text - 'A quick example of the ReadLine method'.
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_readline.html (1 of 2) [29/07/2002 12:25:43]


DevGuru VBScript Method: TextStream.ReadLine

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_readline.html (2 of 2) [29/07/2002 12:25:43]


DevGuru VBScript Method: object.Replace

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: object.Replace
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML object.Replace (String1, String2)
WMLScript
WSH The Replace method is used to replace text in a regular expression search. It can only be used
XHTML with a RegExp object variable.
XML DOM
XSLT Do not confuse this method with the Replace function.
Features
Ask DevGuru The search string pattern is declared using the Pattern property. You can use the Global
ASP Resources property to limit the search to the first occurrence of a match, or all occurrences.
HTML Color Chart
Find the Bug There are two mandatory arguments. If the search string pattern is found in one or more
Knowledge Base occurrences inside the string designated by the String1 argument, then, as set by the Global
Links property, the first or all occurrences of the search string pattern will be replaced with the
Tips of the Week String2 argument.
T-SQL Syntax Charts
Tutorials Code:
Products <%
dgCalendar Dim RegX
dgCharge Set RegX = NEW RegExp
dgChart Dim MyString, SearchPattern, ReplacedText
dgEncrypt MyString = "Ocelots make good pets."
dgFileUpload SearchPattern = "good"
dgReport ReplaceString = "bad"
dgSort RegX.Pattern = SearchPattern
dgTree RegX.Global = True
Site ReplacedText = RegX.Replace(MyString, ReplaceString)
Response.Write(ReplacedText)
Authoring
%>
Coming Soon
DevGuru Resume
Errata
Output:
Link to Us
"Ocelots make bad pets."
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/RegExp_Replace.html (1 of 2) [29/07/2002 12:25:45]


DevGuru VBScript Method: object.Replace

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/RegExp_Replace.html (2 of 2) [29/07/2002 12:25:45]


DevGuru VBScript Method: TextStream.Skip

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: TextStream.Skip
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Skip(numberofcharacters)
WMLScript
WSH This method causes the file pointer to skip forward the integer number of characters specified
XHTML in the argument when reading a TextStream file. The skipped characters are simply ignored.
XML DOM
XSLT Code:
Features <%
dim filesys, text, readfile, contents
Ask DevGuru
set filesys = CreateObject("Scripting.FileSystemObject")
ASP Resources
HTML Color Chart
Set text = filesys.CreateTextFile("c:\somefile2.txt")
Find the Bug
text.WriteLine "A quick example of the Skip method"
Knowledge Base
text.close
Links set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
Tips of the Week readfile.Skip(10)
T-SQL Syntax Charts contents = readfile.ReadLine
Tutorials readfile.close
Response.Write "From column 11 the line contains the following text - '" &_
Products contents & "'."
dgCalendar
%>
dgCharge
dgChart Output:
dgEncrypt "From column 11 the line contains the following text - 'ample of the Skip method'."
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_skip.html (1 of 2) [29/07/2002 12:25:47]


DevGuru VBScript Method: TextStream.Skip

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_skip.html (2 of 2) [29/07/2002 12:25:47]


DevGuru VBScript Method: TextStream.Write

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: TextStream.Write
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Write
WMLScript
WSH This method writes a supplied string to the begining of a TextStream file if opened for writing
XHTML (provided it is the first write since opening the file); if the file is open for appending, the string
XML DOM will be added to the end of the file.
XSLT
Features Code:
<%
Ask DevGuru
Dim filesys, testfile
ASP Resources
HTML Color Chart
Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug
Set testfile= filesys.CreateTextFile("c:\somefile.txt", True)
Knowledge Base
testfile.Write "Your text goes here."
Links testfile.Close
Tips of the Week %>
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_write.html (1 of 2) [29/07/2002 12:25:49]


DevGuru VBScript Method: TextStream.Write

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_write.html (2 of 2) [29/07/2002 12:25:49]


DevGuru VBScript Method: TextStream.WriteBlankLines

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: TextStream.WriteBlankLines
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.WriteBlankLInes
WMLScript
WSH Used to write a number of consecutive newline characters (defined with the lines
XHTML parameter) to a TextStream file.
XML DOM
XSLT Code:
Features <%
Dim filesys, testfile
Ask DevGuru
ASP Resources
Set filesys = CreateObject("Scripting.FileSystemObject")
HTML Color Chart
Set testfile= filesys.CreateTextFile("c:\somefile.txt", True)
Find the Bug
testfile.WriteBlankLines(3)
Knowledge Base testfile.Close
Links %>
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_writeblines.html (1 of 2) [29/07/2002 12:25:50]


DevGuru VBScript Method: TextStream.WriteBlankLines

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_writeblines.html (2 of 2) [29/07/2002 12:25:50]


DevGuru VBScript Method: TextStream.WriteLine

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: TextStream.WriteLine
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.WriteLine
WMLScript
WSH This method writes a supplied string to a TextStream file, followed by a
XHTML new line character.
XML DOM
XSLT Code:
Features <%
Dim filesys, testfile
Ask DevGuru
Set filesys = CreateObject("Scripting.FileSystemObject")
ASP Resources
HTML Color Chart
Set testfile= filesys.CreateTextFile("c:\somefile.txt", True)
Find the Bug
testfile.WriteLine "Your text goes here."
Knowledge Base
testfile.Close
Links %>
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_writeline.html (1 of 2) [29/07/2002 12:25:52]


DevGuru VBScript Method: TextStream.WriteLine

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_writeline.html (2 of 2) [29/07/2002 12:25:52]


DevGuru VBScript Initialize Event

Quick References
ADO All Objects
ASP
CSS2
HTML EVENT: Initialize
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML Initialize
WMLScript
WSH The Initialize event is an optional subroutine that can be called when you create an instance of
XHTML a object using the Class ... End Class statement. You can place any valid VBScript code
XML DOM inside the subroutine that you want to run when the class is initialized.
XSLT
Features The similar Terminate event can be called when you close an object.
Ask DevGuru
ASP Resources Note, as shown in the code example, that the subroutine name must be composed of the word
HTML Color Chart Class, an underscore ( _ ), and the word Initialize().
Find the Bug
Knowledge Base Code:
Links Class DevGuru
Tips of the Week ...
T-SQL Syntax Charts Private Sub Class_Initialize()
Tutorials 'place any valid VBScript code here
Products End Sub
dgCalendar ...
dgCharge End Class
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/initialize.html (1 of 2) [29/07/2002 12:25:54]


DevGuru VBScript Initialize Event

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/initialize.html (2 of 2) [29/07/2002 12:25:54]


DevGuru VBScript Terminate Event

Quick References
ADO All Objects
ASP
CSS2
HTML EVENT: Terminate
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML Terminate
WMLScript
WSH The Terminate event is an optional subroutine that can be called when you terminate an
XHTML instance of an object using the Class ... End Class statement. You can place any valid
XML DOM VBScript code inside the subroutine that you want to run when the class is terminated.
XSLT
Features The similar Initialize event can be called when you create an instance of an object.
Ask DevGuru
ASP Resources Note, as shown in the code example, that the subroutine name must be composed of the word
HTML Color Chart Class, an underscore ( _ ) and the word Terminate().
Find the Bug
Knowledge Base Code:
Links Class DevGuru
Tips of the Week ...
T-SQL Syntax Charts Private Sub Class_Terminate()
Tutorials 'place any valid VBScript code here
Products End Sub
dgCalendar ...
dgCharge End Class
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/terminate.html (1 of 2) [29/07/2002 12:25:57]


DevGuru VBScript Terminate Event

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/terminate.html (2 of 2) [29/07/2002 12:25:57]


DevGuru VBScript Property: TextStream.AtEndOfLine

Quick References
ADO All Properties
ASP
CSS2
HTML Property: TextStream.AtEndOfLine
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.AtEndOfLine
WMLScript
WSH The AtEndOfLine property returns a Boolean value. If the file pointer is positioned immediately
XHTML before the file's end-of-line marker, the value is True. Otherwise, the value is False. The
XML DOM TextStream object must be open for reading or an error will occur when retreiving this property
XSLT this method.
Features
The following code uses the AtEndOfLine property to get the last character in the first line of
Ask DevGuru
ASP Resources
text in a file.
HTML Color Chart
Code:
Find the Bug
<%
Knowledge Base
dim filesys, text, readfile, contents
Links
set filesys = CreateObject("Scripting.FileSystemObject")
Tips of the Week
T-SQL Syntax Charts
Set text = filesys.CreateTextFile("c:\somefile2.txt")
Tutorials
text.Write "Find the last character in the text file"
text.close
Products set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
dgCalendar do while readfile.AtEndOfLine <> true
dgCharge contents = readfile.Read(1)
dgChart loop
dgEncrypt
readfile.close
dgFileUpload
Response.Write "The last character in the text file is '" & contents & "'."
dgReport
%>
dgSort
dgTree Output:
Site "The last character in the text file is 'e'."
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_ateol.html (1 of 2) [29/07/2002 12:25:59]


DevGuru VBScript Property: TextStream.AtEndOfLine

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_ateol.html (2 of 2) [29/07/2002 12:25:59]


DevGuru VBScript Property: TextStream.AtEndOfStream

Quick References
ADO All Properties
ASP
CSS2
HTML Property: TextStream.AtEndOfStream
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.AtEndOfStream
WMLScript
WSH The AtEndOfStream property returns a Boolean value. If the file pointer is positioned at the
XHTML end of the file, the value is True. Otherwise, the value is False. The TextStream object must
XML DOM be open for reading or an error will occur when using this method.
XSLT
Features The following code uses the AtEndOfStream property to get the last character in text file.
Ask DevGuru
Code:
ASP Resources
<%
HTML Color Chart
dim filesys, text, readfile, contents
Find the Bug
set filesys = CreateObject("Scripting.FileSystemObject")
Knowledge Base
Set text = filesys.CreateTextFile("c:\somefile2.txt")
Links
text.Write "Find the last character in the text file"
Tips of the Week
T-SQL Syntax Charts
text.close
Tutorials
set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
do while readfile.AtEndOfStream <> true
Products contents = readfile.Read(1)
dgCalendar loop
dgCharge readfile.close
dgChart Response.Write "The last character in the text file is '" & contents & "'."
dgEncrypt
%>
dgFileUpload
dgReport Output:
dgSort "The last character in the text file is 'e'."
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_ateostream.html (1 of 2) [29/07/2002 12:26:01]


DevGuru VBScript Property: TextStream.AtEndOfStream

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_ateostream.html (2 of 2) [29/07/2002 12:26:01]


DevGuru VBScript Property: File.Attributes

Quick References
ADO File Object
ASP
CSS2
HTML Property: File.Attributes
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML object.Attributes [ = newattributes]
WMLScript
WSH This property allows us to get or change the various attributes of a file. The available attribute
XHTML values are listed below.
XML DOM
XSLT
Name Value Description Read/Write attribute
Features
Ask DevGuru
Normal 0 Normal file Read/write
ASP Resources
HTML Color Chart
Find the Bug ReadOnly 1 Read-only file Read only
Knowledge Base
Links Hidden 2 Hidden file Read/write
Tips of the Week
T-SQL Syntax Charts System 4 System file Read/write
Tutorials
Products Volume 8 Disk drive volume label Read only
dgCalendar
dgCharge Directory 16 Folder or directory Read-only
dgChart
dgEncrypt
Archive 32 File has changed since last backup Read/write
dgFileUpload
dgReport
dgSort Alias 64 Link or shortcut Read-only
dgTree
Site Compressed 2048 Compressed file Read-only
Authoring
Coming Soon
DevGuru Resume The following code shows how to check if a file is read/write or read-only. As you can see,
Errata logical operators are used to get or change the various attributes.
Link to Us
Merchandise Code:
Sponsorships <%
Testimonials dim filesys, text, readfile

http://www.devguru.com/Technologies/vbscript/quickref/file_attributes.html (1 of 2) [29/07/2002 12:26:04]


DevGuru VBScript Property: File.Attributes

What's New set filesys = CreateObject("Scripting.FileSystemObject")


Partners Set text = filesys.CreateTextFile("c:\somefile2.txt")
Code Project text.Write "A simple test to find if this file is writeable."
DevelopersDex text.close
Prog. Heaven set readfile = filesys.GetFile("c:\somefile2.txt")
Tek-Tips Forum If Not readfile.Attributes And 1 Then
TopXML Response.Write "The file is Read/Write."
VBXML.COM Else
VisualBuilder.com Response.Write "The file is Read-only."
W3Schools End If
XMLPitstop %>
ZVON.org
Search Us! Output:
"The file is Read/Write."

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/file_attributes.html (2 of 2) [29/07/2002 12:26:04]


DevGuru VBScript Property: Folder.Attributes

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Folder.Attributes
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Attributes [ = newattributes]
WMLScript
WSH This property allows us to get or change the various attributes of a folder. The available
XHTML attribute values are listed below.
XML DOM
XSLT
Name Value Description Read/Write attribute
Features
Ask DevGuru
Normal 0 Normal file Read/write
ASP Resources
HTML Color Chart
Find the Bug ReadOnly 1 Read-only file Read only
Knowledge Base
Links Hidden 2 Hidden file Read/write
Tips of the Week
T-SQL Syntax Charts System 4 System file Read/write
Tutorials
Products Volume 8 Disk drive volume label Read only
dgCalendar
dgCharge Directory 16 Folder or directory Read-only
dgChart
dgEncrypt
Archive 32 File has changed since last backup Read/write
dgFileUpload
dgReport
dgSort Alias 64 Link or shortcut Read-only
dgTree
Site Compressed 2048 Compressed file Read-only
Authoring
Coming Soon
DevGuru Resume
Errata The following code shows how to check if a folder is read/write or read-only. As you can see,
Link to Us logical operators are used to get or change the various attributes.
Merchandise
Sponsorships Code:
Testimonials <%
dim filesys, demofolder

http://www.devguru.com/Technologies/vbscript/quickref/folder_attributes.html (1 of 2) [29/07/2002 12:26:06]


DevGuru VBScript Property: Folder.Attributes

What's New set filesys = CreateObject("Scripting.FileSystemObject")


Partners set demofolder = filesys.GetFolder("c:\Projects\")
Code Project If Not demofolder.Attributes And 1 Then
DevelopersDex Response.Write "The folder is Read/Write."
Prog. Heaven Else
Tek-Tips Forum Response.Write "The folder is Read-only."
TopXML End If
VBXML.COM %>
VisualBuilder.com
W3Schools Output:
XMLPitstop "The folder is Read/Write."
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/folder_attributes.html (2 of 2) [29/07/2002 12:26:06]


DevGuru VBScript Property: TextStream.Column

Quick References
ADO All Properties
ASP
CSS2
HTML Property: TextStream.Column
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Column
WMLScript
WSH The Column property returns the current position of the file pointer within the current line.
XHTML Column 1 is the first character in each line.
XML DOM
XSLT The follwing code uses the Column property to get the column number of the last
Features character in a text file.
Ask DevGuru
Code:
ASP Resources
<%
HTML Color Chart
dim filesys, text, readfile, contents
Find the Bug
set filesys = CreateObject("Scripting.FileSystemObject")
Knowledge Base
Set text = filesys.CreateTextFile("c:\somefile2.txt")
Links
text.Write "Find the last character in the text file"
Tips of the Week
text.close
T-SQL Syntax Charts
Tutorials
set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
do while readfile.AtEndOfStream <> true
Products contents = readfile.Read(1)
dgCalendar col = readfile.Column -1
dgCharge loop
dgChart readfile.close
dgEncrypt Response.Write "The last character in the text file is '" & contents & "' and its_
dgFileUpload
column number is '" & col & "'."
dgReport
%>
dgSort
dgTree Output:
Site "The last character in the text file is 'e' and its column number is '40'."
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_column.html (1 of 2) [29/07/2002 12:26:09]


DevGuru VBScript Property: TextStream.Column

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_column.html (2 of 2) [29/07/2002 12:26:09]


DevGuru VBScript Property: Err.Description

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Err.Description
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML object. Description [ = string]
WMLScript
WSH This property returns or sets a string containing a brief textual description of an error. The
XHTML optional string argument lets you define the description of the error in your code. Otherwise,
XML DOM providing the generated error number relates to a VBScript runtime error, the Description
XSLT value is automatically filled with a default description.
Features
Code:
Ask DevGuru
ASP Resources
<%
HTML Color Chart
On Error Resume Next
Find the Bug
Err.Raise 48
Knowledge Base Err.Description = "My error"
Links Response.Write "Error type is '" & Err.Description & "'."
Tips of the Week %>
T-SQL Syntax Charts
Tutorials
Output:
"Error type is 'My error'."
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/err_description.html (1 of 2) [29/07/2002 12:26:11]


DevGuru VBScript Property: Err.Description

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/err_description.html (2 of 2) [29/07/2002 12:26:11]


DevGuru VBScript Property: Drive.DriveType

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Drive.DriveType
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML object.DriveType
WMLScript
WSH The DriveType property returns an integer whose value corresponds to one of the DriveType
XHTML Constants listed below. Note that only an integer is returned; to use the names below they
XML DOM must be defined in your code.
XSLT
Features
Ask DevGuru 0 = Unknown
ASP Resources 1 = Removable
HTML Color Chart 2 = Fixed
Find the Bug 3 = Network
Knowledge Base 4 = CD-ROM
Links 5 = RAM Disk
Tips of the Week
T-SQL Syntax Charts
Code:
Tutorials
<%
Products dim filesys
dgCalendar set filesys = CreateObject("Scripting.FileSystemObject")
dgCharge Set drv = filesys.GetDrive("c")
dgChart select case drv.DriveType
dgEncrypt case 0: drtype = "Unknown"
dgFileUpload case 1: drtype = "Removable"
dgReport case 2: drtype = "Fixed"
dgSort case 3: drtype = "Network"
dgTree case 4: drtype = "CD-ROM"
Site case 5: drtype = "RAM Disk"
Authoring end select
Coming Soon Response.Write ("The specified drive is a " & drtype & " type disk.")
DevGuru Resume %>
Errata
Link to Us Output:
Merchandise The specified drive is a Fixed type disk.
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/drive_drivetype.html (1 of 2) [29/07/2002 12:26:12]


DevGuru VBScript Property: Drive.DriveType

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/drive_drivetype.html (2 of 2) [29/07/2002 12:26:12]


DevGuru VBScript Property: Err.HelpContext

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Err.HelpContext
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML object.HelpContext [ = contextID]
WMLScript
WSH This property is used to set or return a context ID for a Help topic specified with the HelpFile
XHTML property. If no specific Help file is defined in your code then one of two things can happen.
XML DOM Firstly, VBScript checks to see if the Number value of the Err object relates to a known runtime
XSLT error. If it does then the VBScript Help context ID for that error is used. However, if the Number
Features property value is not recognised, then VBScript will display the Help contents screen.
Ask DevGuru
ASP Resources
Code:
HTML Color Chart
<%
Find the Bug On Error Resume Next
Knowledge Base Err.Raise 10
Links Err.HelpFile = "userhelp.hlp"
Tips of the Week Err.HelpContext = usercontextID
T-SQL Syntax Charts If Err.Number <> 0 Then
Tutorials MsgBox "Press F1 for help", , "Error: " & Err.Description, Err.Helpfile, _
Err.HelpContext
Products
End If
dgCalendar
%>
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/err_helpcontext.html (1 of 2) [29/07/2002 12:26:14]


DevGuru VBScript Property: Err.HelpContext

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/err_helpcontext.html (2 of 2) [29/07/2002 12:26:14]


DevGuru VBScript Property: Err.HelpFile

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Err.HelpFile
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML object. HelpFile [ = contextID]
WMLScript
WSH This property is used to get or define the path to a Help file. Once set, this Help file is available
XHTML to the user when pressing the 'Help' button in the Message box. If the HelpContext property is
XML DOM set then the Help file that the context Id points to will be displayed and, if no HelpFile is
XSLT specified, the VBScript Help contents screen is used.
Features
Code:
Ask DevGuru
ASP Resources
<%
HTML Color Chart
On Error Resume Next
Find the Bug
Err.Raise 10
Knowledge Base Err.HelpFile = "userhelp.hlp"
Links Err.HelpContext = usercontextID
Tips of the Week If Err.Number <> 0 Then
T-SQL Syntax Charts MsgBox "Press F1 for help", , "Error: " & Err.Description, Err.Helpfile, _
Tutorials Err.HelpContext
End If
Products %>
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/err_helpfile.html (1 of 2) [29/07/2002 12:26:16]


DevGuru VBScript Property: Err.HelpFile

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/err_helpfile.html (2 of 2) [29/07/2002 12:26:16]


DevGuru VBScript Property: Dictionary.Item

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Dictionary.Item
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML The Item property sets or returns the value of an item for the specified key and Dictionary.
WMLScript
WSH Keyvalue is the value of the key associated with the item being returned or set and itemvalue
XHTML is an optional value which sets the value of the item associated with that key.
XML DOM
XSLT If the specified key is not found when attempting to change an item, a new key/item pair is
Features added to the dictionary. If the key is not found while trying to return an existing item, a new key
is added and the item value is left empty.
Ask DevGuru
ASP Resources
Code:
HTML Color Chart
<%
Find the Bug
Set d = CreateObject("Scripting.Dictionary")
Knowledge Base
d.Add "a", "Alvis" 'Add some keys and items.
Links
d.Add "b", "Buick"
Tips of the Week
d.Add "c", "Cadillac"
T-SQL Syntax Charts
Tutorials
d.Item("c") = "Corvette"
Response.Write "Value associated with key 'c' has changed to " d.Item("c")
Products %>
dgCalendar
dgCharge Output:
dgChart "Value associated with key 'c' has changed to Corvette"
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_item.html (1 of 2) [29/07/2002 12:26:18]


DevGuru VBScript Property: Dictionary.Item

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_item.html (2 of 2) [29/07/2002 12:26:18]


DevGuru VBScript Property: Drives Collection.Item

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Drives Collection.Item
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML object.Item (drive)
WMLScript
WSH This property returns an Item from the collection relating to a specified
XHTML key (drive name).
XML DOM
XSLT The following code shows how to retrieve an item from a Drives
Features collection.
Ask DevGuru
<%
ASP Resources
Code:
HTML Color Chart
Dim filesys, drvcoll, label
Find the Bug
Set filesys = CreateObject("Scripting.FileSystemObject")
Knowledge Base
Set drvcoll = filesys.Drives
Links
label = drvcoll.Item("c")
Tips of the Week
Response.Write "The volume label for drive c is '" & it & "'."
T-SQL Syntax Charts
Tutorials
%>
Products Output:
dgCalendar "The volume label for drive c is 'C:'."
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/drivescoll_item.html (1 of 2) [29/07/2002 12:26:19]


DevGuru VBScript Property: Drives Collection.Item

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/drivescoll_item.html (2 of 2) [29/07/2002 12:26:19]


DevGuru VBScript Property: Files Collection.Item

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Files Collection.Item
JavaScript
Jet SQL Implemented in version 3.0
VBScript
WML object.Item ("filename")
WMLScript
WSH This property returns an Item from the collection relating to a specified key
XHTML (file name).
XML DOM
XSLT The following code shows how to retrieve an item from a Files collection.
Features <%
Ask DevGuru
Code:
ASP Resources
Dim filesys, demofolder, filecoll, selectfile
HTML Color Chart
Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug
Set demofolder = filesys.GetFolder("foldername")
Knowledge Base
Set filecoll = demofolder.Files
Links
selectfile = filecoll.Item("filename")
Tips of the Week
%>
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filescoll_item.html (1 of 2) [29/07/2002 12:26:21]


DevGuru VBScript Property: Files Collection.Item

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filescoll_item.html (2 of 2) [29/07/2002 12:26:21]


DevGuru VBScript Property: Folders collection.Item

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Folders Collection.Item
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Item ("foldername")
WMLScript
WSH This property returns an Item from the collection relating to a specified key
XHTML (foldername).
XML DOM
XSLT The following code shows how to retrieve an item from a Folders collection.
Features <%
Ask DevGuru
Code:
ASP Resources
Dim filesys, demofolder, folcoll, selectfolder
HTML Color Chart
Set filesys = CreateObject("Scripting.FileSystemObject")
Find the Bug
Set demofolder = filesys.GetFolder("foldername")
Knowledge Base
Set folcoll = demofolder.SubFolders
Links
selectfolder = folcoll.Item("foldername")
Tips of the Week
%>
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/foldercoll_item.html (1 of 2) [29/07/2002 12:26:23]


DevGuru VBScript Property: Folders collection.Item

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/foldercoll_item.html (2 of 2) [29/07/2002 12:26:23]


DevGuru VBScript Property: Dictionary::Key

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Dictionary.Key
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object. Keys
WMLScript
WSH The Key property lets us change the key value of an existing key/item pair.
XHTML
XML DOM Keyvalue is the current key value and newkeyvalue is the value you want
XSLT to change it to.
Features
If the specified key is not found when attempting to change it, a runtime
Ask DevGuru
ASP Resources
error will occur
HTML Color Chart
Code:
Find the Bug
<%
Knowledge Base
Set d = CreateObject("Scripting.Dictionary")
Links
d.Add "a", "Alvis" 'Add some keys and items.
Tips of the Week
T-SQL Syntax Charts
d.Add "b", "Buick"
Tutorials
d.Add "c", "Corvette"
d.Key("c") = "d"
Products Response.Write "The key associated with the item " & d.Item("d") & " has
dgCalendar been changed to 'd'." %>
dgCharge
dgChart Output:
dgEncrypt The key associated with the item Corvette has been changed to 'd'.
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_key.html (1 of 2) [29/07/2002 12:26:25]


DevGuru VBScript Property: Dictionary::Key

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_key.html (2 of 2) [29/07/2002 12:26:25]


DevGuru VBScript Property: TextStream.Line

Quick References
ADO All Properties
ASP
CSS2
HTML Property: TextStream.Line
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.Line
WMLScript
WSH The Line property is used to return the current line number in a text file. Upon opening a textfile
XHTML and before any writing takes place, Line always returns '1'.
XML DOM
XSLT Code:
Features <%
dim filesys, text, readfile, contents, col, linumber
Ask DevGuru
ASP Resources
set filesys = CreateObject("Scripting.FileSystemObject")
HTML Color Chart
Set text = filesys.CreateTextFile("c:\somefile2.txt")
Find the Bug
text.Write "Find the last character in the text file"
Knowledge Base text.close
Links set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
Tips of the Week do while readfile.AtEndOfStream <> true
T-SQL Syntax Charts contents = readfile.Read(1)
Tutorials col = readfile.Column -1
linumber = readfile.Line
Products loop
dgCalendar
readfile.close
dgCharge
Response.Write "The last character in line " & linumber & " is '" & contents & "' and_
dgChart
its column number is '" & col & "'."
dgEncrypt
%>
dgFileUpload
dgReport
Output:
dgSort
"The last character in line 1 is 'e' and its column number is '40'."
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_line.html (1 of 2) [29/07/2002 12:26:27]


DevGuru VBScript Property: TextStream.Line

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_line.html (2 of 2) [29/07/2002 12:26:27]


DevGuru VBScript Property: Err.Number

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Err.Number
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML object.Number [ = errnumber]
WMLScript
WSH This property, which is the default property of the Err object, is used to retrieve or set the value
XHTML that relates to a specific runtime error or SCODE. This value is automatically generated when
XML DOM an error occurs and is reset to zero (no error) after an On Error Resume Next statement or
XSLT after using the Clear method.
Features
Code:
Ask DevGuru
ASP Resources
<%
HTML Color Chart
On Error Resume Next
Find the Bug Err.Raise 10
Knowledge Base Err.HelpFile = "userhelp.hlp"
Links Err.HelpContext = usercontextID
Tips of the Week If Err.Number <> 0 Then
T-SQL Syntax Charts MsgBox "Press F1 for help", , "Error: " & Err.Description, Err.Helpfile, _
Tutorials Err.HelpContext
End If
Products
%>
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/err_number.html (1 of 2) [29/07/2002 12:26:28]


DevGuru VBScript Property: Err.Number

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/err_number.html (2 of 2) [29/07/2002 12:26:28]


DevGuru VBScript Property: Pattern

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Pattern
JavaScript
Jet SQL object.Pattern
VBScript
WML The Pattern property is used with a RegExp object variable to declare a string search
WMLScript pattern (also known as a regular expression).
WSH
XHTML Code:
XML DOM <%
XSLT MyRegExpObject.Pattern = "red jaguar"
Features %>
Ask DevGuru
ASP Resources The search pattern can also be a regular expression. Here is a brief introductory list of
HTML Color Chart allowable special characters.
Find the Bug
Knowledge Base Character Usage
Links * Matches the previous character zero or more times
Tips of the Week
T-SQL Syntax Charts + Matches the previous character one or more times
Tutorials ? Matches the previous character zero or one times
Products . Matches any single character except the newline
dgCalendar ^ Matches the start of the input
dgCharge
$ Matches the end of the input
dgChart
dgEncrypt x|y Matches either first or second character listed
dgFileUpload (pattern) Matches pattern
dgReport
{number} Matches exactly number times
dgSort
dgTree {number,} Matches number, or more, times (note comma)
Site {num1, num2} Matches at least num1 and at most num2 times
Authoring [abc] Matches any character listed between the [ ]
Coming Soon [^abc] Matches all characters except those listed between the [ ]
DevGuru Resume
Errata
[a-e] Matches any characters in the specified range (a,b,c,d,e)
Link to Us [^K-Q] Matches all characters except in the specified range
Merchandise \ Signifies that the next character is special or a literal.
Sponsorships
\b Matches only on a word boundary
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/regexp_pattern.html (1 of 2) [29/07/2002 12:26:31]


DevGuru VBScript Property: Pattern

What's New
\B Matches only inside a word
Partners \d Matches only on a digit
Code Project
DevelopersDex \D Matches only on a non-digit
Prog. Heaven \f Matches only on a form feed character
Tek-Tips Forum
\n Matches only on a new line
TopXML
VBXML.COM \r Matches only on a carriage return
VisualBuilder.com \s Matches only on a blank space
W3Schools \S Matches only on nonblank spaces
XMLPitstop
ZVON.org
\t Matches only on a tab
Search Us! \v Matches only on a vertical tab
\w Matches only on A to Z, a to z, 1 to 9, and _
\W Matches characters other than A to Z, a to z, 1 to 9, and _
\number Matches any positive number
\octal Matches any octal number
\xhex Matches any hexadecimal number (x is required)

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/regexp_pattern.html (2 of 2) [29/07/2002 12:26:31]


DevGuru VBScript Property: Err.Source

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Err.Source
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML object. Source [ = string]
WMLScript
WSH This property lets us determine the object or application that caused an error, and returns a
XHTML string that contains its Class name or programmatic ID. Also used when generating errors in
XML DOM your code to identify your application as the source, using the optional [ = string] argument, as
XSLT below.
Features
Code:
Ask DevGuru
ASP Resources
<%
HTML Color Chart
On Error Resume Next
Find the Bug
Err.Raise 8 'raise a user-defined error
Knowledge Base Err.Description = "My Error"
Links Err.Source = "MyAppName"
Tips of the Week Response.Write "An Error of the type '" & Err.Description & "' has been_
T-SQL Syntax Charts caused by '" & Err.Source & "'."
Tutorials %>
Products Output:
dgCalendar "An Error of the type 'My Error' has caused by 'MyAppName'."
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/err_source.html (1 of 2) [29/07/2002 12:26:34]


DevGuru VBScript Property: Err.Source

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/err_source.html (2 of 2) [29/07/2002 12:26:34]


DevGuru VBScript Dictionary.CompareMode Property

Quick References
ADO All Properties
ASP
CSS2
HTML Property: Dictionary.CompareMode
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.CompareMode[ = comparison_mode]
WMLScript
WSH The CompareMode property is used to set and return the key's string comparison mode which
XHTML determines how keys are matched while looking up or searching. Keys can be treated as case-
XML DOM sensitive or case-insensitive.
XSLT
Features To do the comparison, you use the Comparison Constants. You may use either the
CONSTANT (left column) or the VALUE (center column) in your code and get the same results.
Ask DevGuru
ASP Resources
HTML Color Chart CONSTANT VALUE DESCRIPTION
Find the Bug
Knowledge Base VBBinaryCompare 0 binary Comparison
Links
Tips of the Week VBTextCompare 1 Text Comparison
T-SQL Syntax Charts
Tutorials VBDataBaseCompare 2 Compare information inside database
Products
dgCalendar
dgCharge
In the following example the Add method fails on the last line because the key "b" already
dgChart
exists. If CompareMode were set to VBBinaryCompare a new key "B" (upper case) with a
dgEncrypt
value of "Bentley" will be added to the dictionary.
dgFileUpload
dgReport
Code:
dgSort
<%
dgTree
Dim d
Site Set d = CreateObject("Scripting.Dictionary")
Authoring d.CompareMode = VBTextCompare
Coming Soon d.Add "a", "Alvis"
DevGuru Resume d.Add "b", "Buick"
Errata d.Add "c", "Cadillac"
Link to Us d.Add "B", "Bentley" 'fails here.
Merchandise %>
Sponsorships
Testimonials Output:

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_comparemode.html (1 of 2) [29/07/2002 12:26:37]


DevGuru VBScript Dictionary.CompareMode Property

What's New "Alvis"


Partners "Buick"
Code Project "Cadillac"
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dictionary_comparemode.html (2 of 2) [29/07/2002 12:26:37]


DevGuru VBScript Method: FileSystemObject.CopyFile

Quick References
ADO All Objects
ASP
CSS2
HTML METHOD: FileSystemObject.CopyFile
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.CopyFile source, destination [, overwrite]
WMLScript
WSH This method lets us copy one or more files from one location ( the source) to another
XHTML (destination). Wildcards can be used within the source string, providing it is the last component
XML DOM in the path, to enable the copying of multiple files, but cannot be used in the destination string.
XSLT Note that if the source does contain wildcards, it is automatically assumed that the
Features destination is an existing folder and any matching files are copied to it.
Ask DevGuru
ASP Resources
The overwrite parameter is a Boolean. True allows the overwriting of existing files in the
HTML Color Chart destination, providing that the permissions on the destination allow it ( if the destination is set
Find the Bug as read-only, the CopyFile method will fail). An overwrite setting of False prevents existing
Knowledge Base files in the destination from being overwritten.
Links
Tips of the Week It is recommended that you use the FileExists method when copying or moving a file - if a
T-SQL Syntax Charts source file doesn't exist you'll get an error.
Tutorials
Code:
Products <%
dgCalendar dim filesys
dgCharge set filesys=CreateObject("Scripting.FileSystemObject")
dgChart If filesys.FileExists("c:\sourcefolder\anyfile.html") Then
dgEncrypt filesys.CopyFile "c:\sourcefolder\anyfile.html", "c:\destfolder\"
dgFileUpload End If
dgReport
%>
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_copyfile.html (1 of 2) [29/07/2002 12:26:39]


DevGuru VBScript Method: FileSystemObject.CopyFile

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_copyfile.html (2 of 2) [29/07/2002 12:26:39]


DevGuru VBScript Method: FileSystemObject.CreateTextFile

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: FileSystemObject.CreateTextFile
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.CreateTextFile filename [, overwrite[, unicode]]
WMLScript
WSH This method is used to create a text file and returns a TextStreamObject that can then be
XHTML used to write to and read from the file.
XML DOM
XSLT The optional overwrite parameter returns a Boolean value - True (the default) permits
Features overwriting of existing files while False does not. The other optional parameter, unicode, is
also a Boolean. In this case, True creates a Unicode file and False (the default) creates an
Ask DevGuru
ASP Resources
AscII file.
HTML Color Chart
Find the Bug Code:
Knowledge Base <%
Links dim filesys, filetxt, getname, path
Tips of the Week Set filesys = CreateObject("Scripting.FileSystemObject")
T-SQL Syntax Charts Set filetxt = filesys.CreateTextFile("c:\somefile.txt", True)
Tutorials path = filesys.GetAbsolutePathName("c:\somefile.txt")
getname = filesys.GetFileName(path)
Products
filetxt.WriteLine("Your text goes here.")
dgCalendar
filetxt.Close
dgCharge
If filesys.FileExists(path) Then
dgChart
Response.Write ("Your file, '" & getname & "', has been created.")
dgEncrypt
End If
dgFileUpload
dgReport
%> Output:
dgSort
"Your file, 'somefile.txt', has been created."
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_createtextfile.html (1 of 2) [29/07/2002 12:26:43]


DevGuru VBScript Method: FileSystemObject.CreateTextFile

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject_createtextfile.html (2 of 2) [29/07/2002 12:26:43]


DevGuru VBScript Method: TextStream.SkipLine

Quick References
ADO All Objects
ASP
CSS2
HTML METHOD: TextStream.SkipLine
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML object.SkipLine
WMLScript
WSH Moves the file pointer from its current position to the beginning of the
XHTML next line.
XML DOM
XSLT Code:
Features <%
dim filesys, text, readfile, contents
Ask DevGuru
set filesys = CreateObject("Scripting.FileSystemObject")
ASP Resources
Set text = filesys.CreateTextFile("c:\somefile2.txt")
HTML Color Chart
Find the Bug
text.WriteLine "A quick example of the SkipLine method"
Knowledge Base
text.WriteLine "Well, maybe not so quick!"
Links
text.WriteLine "This should be enough!"
Tips of the Week text.close
T-SQL Syntax Charts set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
Tutorials readfile.SkipLine
contents = readfile.ReadLine
Products readfile.close
dgCalendar
Response.Write "Line 2 contains the following text - '" & contents &
dgCharge
"'."
dgChart
%>
dgEncrypt
dgFileUpload Output:
dgReport "Line 2 contains the following text - 'Well, maybe not so quick!'."
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/textstream_skipline.html (1 of 2) [29/07/2002 12:26:54]


DevGuru VBScript Method: TextStream.SkipLine

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/textstream_skipline.html (2 of 2) [29/07/2002 12:26:54]


DevGuru VBScript Statement: Call

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Call
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Call
WMLScript
WSH The Call statement can be used for calling a function or subroutine.
XHTML
XML DOM Note that the use of Call is optional. In other words, you can call a function or subroutine by
XSLT simply stating the function's or subroutine's name. If you use Call and if there are one or more
Features arguments to be passed you must enclose all of the arguments in parentheses. If you do not
Ask DevGuru use Call, do not use the parentheses.
ASP Resources
HTML Color Chart If you use Call to call a function, the return value of the function is discarded.
Find the Bug
Knowledge Base Code:
Links <% Call afunction %>
Tips of the Week
T-SQL Syntax Charts <% afunction %>
Tutorials
Products <% Call myfunction(myvar1, myvar2, mystring, myarray) %>
dgCalendar
dgCharge <% myfunction myvar1, myvar2, mystring, myarray %>
dgChart
dgEncrypt <% Call anysubroutine(anum, astring) %>
dgFileUpload
dgReport <% anothersubroutine %>
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/call.html (1 of 2) [29/07/2002 12:26:57]


DevGuru VBScript Statement: Call

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/call.html (2 of 2) [29/07/2002 12:26:57]


DevGuru VBScript Statement: Class

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Class
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML Class ... End Class
WMLScript
WSH The Class statement block is used to create a Class object. You can only create (name) one
XHTML Class object with each Class statement. This ability to create your own Class is a significant
XML DOM expansion of the usefulness of the VBScript language.
XSLT
Features Within the block of the Class statement you can declare the members of the class, which are
Ask DevGuru variables, methods, and properties. Methods of the class are implemented by defining a Sub or
ASP Resources Function procedure, while properties are defined through the use of Property Get, Property
HTML Color Chart Let, and Property Set statements. Any member of a class may be declared as either Public or
Find the Bug Private, with a Public declaration being the default state. Private members of a class are only
Knowledge Base accessible by other members of the same class, while Public members are accessible by
Links anything, inside or outside of the scope of the class.
Tips of the Week
T-SQL Syntax Charts The Class statement must always end with an End Class.
Tutorials
Products Example:
dgCalendar <%
dgCharge Class DevGuruProducts
dgChart
dgEncrypt ' Creating a private property using Get, Let, Set
dgFileUpload Private mstrName
dgReport ' Get
dgSort Public Property Get CustomerName()
dgTree CustomerName = mstrName
Site End Property
Authoring
' Let
Coming Soon
Public Property Let CustomerName(strName)
DevGuru Resume
mstrName = strName
Errata End Property
Link to Us ' Set
Merchandise Public Property Set Guru(objGuru)
Sponsorships Private mobjGuru
Testimonials Set mobjGuru = objGuru
End Property

http://www.devguru.com/Technologies/vbscript/quickref/classstatement.html (1 of 2) [29/07/2002 12:26:59]


DevGuru VBScript Statement: Class

What's New
Partners ' Creating a private method using a function
Code Project Private Function DevGuruProductName(intProduct)
DevelopersDex Select Case intProduct
Prog. Heaven Case 1
Tek-Tips Forum DevGuruProductName = "dgCharge"
TopXML Case 2
VBXML.COM DevGuruProductName = "dgList"
VisualBuilder.com Case 3
W3Schools DevGuruProductName = "dgReport"
XMLPitstop End Function
ZVON.org
Search Us! End Class
%>

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/classstatement.html (2 of 2) [29/07/2002 12:26:59]


DevGuru VBScript Statement: Const

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Const
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Const
WMLScript
WSH The Const statement allows you to declare your own constants.
XHTML
XML DOM Once you declare a constant, you cannot change the value of that constant. If you try to
XSLT change the value, you will get an error message (illegal assignment).
Features
Ask DevGuru Code:
ASP Resources <% Const myconstant = 71.348 %>
HTML Color Chart Our current interest rate is <% =myconstant %> % per year.
Find the Bug
Knowledge Base Output:
Links Our current interest rate is 71.348 % per year.
Tips of the Week
T-SQL Syntax Charts You can declare several constants at the same time.
Tutorials
Products Code:
dgCalendar <% Const stringconstant = "Please send money!", someconstant = .277, tigre = "Jaguar" %>
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/const.html (1 of 2) [29/07/2002 12:27:01]


DevGuru VBScript Statement: Const

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/const.html (2 of 2) [29/07/2002 12:27:01]


DevGuru VBScript Statement: Dim

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Dim
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Dim
WMLScript
WSH The Dim statement allows you to explicitly declare one or more new variables and to allocate
XHTML storage (memory) space.
XML DOM
XSLT While you do not have to use Dim to create new variables in VBScript, the wise programmer
Features prefers to use Dim. In fact, many programmer purposely include the Option Explicit statement
Ask DevGuru in all of their VBScript programs which mandates that all variables be explicitly declared.
ASP Resources
HTML Color Chart Code:
Find the Bug <% Dim myvariable %>
Knowledge Base <% Dim OneVar, TwoVar, ThreeVar, FourVar, MoreVar, EvenMoreVar %>
Links
Tips of the Week Dim can also be used to create static (fixed) and dynamic arrays.
T-SQL Syntax Charts
Tutorials A static array has the number of elements declared by the Dim statement. However, you must
Products remember that the elements in an array are numbered starting at zero. Consider the following
dgCalendar Dim declaration. It creates a static array containing six elements that are numbered 0, 1, 2, 3, 4
dgCharge and 5.
dgChart
dgEncrypt Code:
dgFileUpload <% Dim SixElementArray(5) %>
dgReport
dgSort A dynamic array is declared using empty parentheses. At a later point in your program, you can
dgTree use the ReDim statement to declare the number of dimensions and elements. In fact, you can
Site redeclare a dynamic array as many times as you desire.
Authoring
Coming Soon Code:
DevGuru Resume <%
Errata Dim SomeArray()
Link to Us ...
Merchandise ReDim SomeArray(22)
Sponsorships ...
Testimonials ReDim SomeArray(500)

http://www.devguru.com/Technologies/vbscript/quickref/dim.html (1 of 2) [29/07/2002 12:27:03]


DevGuru VBScript Statement: Dim

What's New %>


Partners
Code Project Arrays can also have up to sixty dimensions. For example, the following code creates a three
DevelopersDex dimensional array. The first dimension has 23 elements, the second dimension has 15
Prog. Heaven elements and the third dimension has 201 elements. Therefore, there are a total of 23x15x201
Tek-Tips Forum = 69345 elements in this array.
TopXML
VBXML.COM The number of dimensions that you can create is limited by the available memory. If you
VisualBuilder.com exceed the available memory while declaring an array, you will get an error message.
W3Schools
XMLPitstop Code:
ZVON.org <% Dim ThreeDimensionArray(22, 14, 200) %>
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dim.html (2 of 2) [29/07/2002 12:27:03]


DevGuru VBScript Statement: Option Explicit

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Option Explicit
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Option Explicit
WMLScript
WSH The Option Explicit statement forces the explicit declaration of all variables using the Dim,
XHTML Private, Public, or ReDim statements.
XML DOM
XSLT In a long program, this statement prevents the accidental reuse of the name of a previously
Features declared variable. Also, if you mistype a declared variable's name or try to use an undeclared
Ask DevGuru variable, an error message is generated.
ASP Resources
HTML Color Chart Note that the Option Explicit statement must be placed at the top of the code before any other
Find the Bug VBScript commands or any HTML code.
Knowledge Base
Links Code:
Tips of the Week <% Option Explicit %>
T-SQL Syntax Charts < HTML >
Tutorials < HEAD >
Products < TITLE > EXAMPLE < /TITLE >
dgCalendar < /HEAD >
dgCharge < BODY >
dgChart <% Dim myvariable = 123.456 yourvar = 0 %>
dgEncrypt < /BODY >
dgFileUpload < /HTML >
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/optionexplicit.html (1 of 2) [29/07/2002 12:27:04]


DevGuru VBScript Statement: Option Explicit

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/optionexplicit.html (2 of 2) [29/07/2002 12:27:04]


DevGuru VBScript Statement: ReDim

Quick References
ADO Dim Statement
ASP
CSS2
HTML STATEMENT: ReDim
JavaScript
Jet SQL ReDim
VBScript
WML The ReDim statement allows you to formally declare, and to later redeclare as many times as
WMLScript you need, the size (and hence the memory space allocation) for a dynamic array that was
WSH originally declared using either a Dim, Private or Public statement.
XHTML
XML DOM The first time you use ReDim to declare an array, you can create either a single or a multiple
XSLT dimension array. However, after you have set the number of the dimensions, you cannot later
Features go back and change the number of the dimensions. Also, once you have created a multi-
Ask DevGuru dimension array, you can only redeclare the size of the last element.
ASP Resources
HTML Color Chart If you make the array bigger, you can use the keyword Preserve to protect all of the existing
Find the Bug elements. If you make the array smaller, you will lose part of the array elements even if you use
Knowledge Base Preserve. Do not use Preserve the first time that you ReDim an array since it will prohibit
Links setting multiple dimensions.
Tips of the Week
T-SQL Syntax Charts In this example, we declare myarray() to have a single dimensions and then resize the
Tutorials element. When we resize from 999 down to 9, we lose the data in the other 990 elements.
Products
dgCalendar Code:
dgCharge <% Dim myarray() %>
dgChart <% ReDim myarray(5) %>
dgEncrypt <% ReDim Preserve myarray(999) %>
dgFileUpload <% ReDim Preserve myarray(9) %>
dgReport
dgSort In this example, we declare myarray() to have three dimensions and then resize the last
dgTree element. When we resize the last element from 999 down to 9, we lose the data in the other
Site 990 elements.
Authoring
Coming Soon Code:
DevGuru Resume <% Dim myarray() %>
Errata <% ReDim myarray(20, 10, 99) %>
Link to Us <% ReDim Preserve myarray(20, 10, 999) %>
Merchandise <% ReDim Preserve myarray(20, 10, 9) %>
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/REDIM.html (1 of 2) [29/07/2002 12:27:07]


DevGuru VBScript Statement: ReDim

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/REDIM.html (2 of 2) [29/07/2002 12:27:07]


DevGuru VBScript Statement: Do Loop

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Do
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Do . . . Loop
WMLScript
WSH The Do statement repeats a block of code Until a condition becomes true or While a condition
XHTML is satisfied.
XML DOM
XSLT You must end all Do statements with Loop or you will get an error message. You can place Do
Features loops inside of other conditional statements. The While and the Until condition may be placed
Ask DevGuru after the Do or the Loop.
ASP Resources
HTML Color Chart Code:
Find the Bug <%
Knowledge Base number = 1
Links Do Until number = 5
Tips of the Week number = number + 1
T-SQL Syntax Charts Loop
Tutorials %>
Products
dgCalendar <%
dgCharge number = 1
dgChart Do
dgEncrypt number = number + 1
dgFileUpload Loop Until number = 5
dgReport %>
dgSort
dgTree <%
Site number = 1
Authoring
Do While number < 5
Coming Soon number = number + 1
DevGuru Resume Loop
Errata %>
Link to Us
Merchandise <%
Sponsorships number = 1
Testimonials Do
number = number + 1

http://www.devguru.com/Technologies/vbscript/quickref/doloop.html (1 of 2) [29/07/2002 12:27:09]


DevGuru VBScript Statement: Do Loop

What's New Loop While number < 5


Partners %>
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/doloop.html (2 of 2) [29/07/2002 12:27:09]


DevGuru VBScript Statement: Erase

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Erase
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Erase
WMLScript
WSH The Erase statement is used to empty arrays.
XHTML
XML DOM If the array is fixed (static), this statement removes the values for all of the elements. If the
XSLT fixed array is a string array, all of the string elements are reinitialized to "". If the fixed array is a
Features numeric array, all of the numeric elements are reinitialized to 0. So the memory remains
Ask DevGuru allocated for the elements. The array continues to exist with the same size (in the example 3),
ASP Resources but the elements are essentially zeroed out.
HTML Color Chart
Find the Bug Fixed array:
Knowledge Base
Links Code:
Tips of the Week <% Dim myarray(3) %>
T-SQL Syntax Charts <% myarray(0) = 111 %>
Tutorials <% myarray(1) = 222 %>
Products <% myarray(2) = 333 %>
dgCalendar <% Erase myarray %>
dgCharge
dgChart If the array is dynamic, the erase statement frees the memory allocated to the dynamic array
dgEncrypt and the array is destroyed. If you try to access an element in the erased array, you will get an
dgFileUpload error message (array out of bounds) since the elements do not exist in memory any more.
dgReport However, you can reinitialize the array by using ReDim. This ability to free memory is very
dgSort useful.
dgTree
Site Dynamic array:
Authoring
Coming Soon
Code:
DevGuru Resume <% Dim anarray() %>
Errata <% ReDim anarray(3) %>
Link to Us <% anarray(0) = "First string." %>
Merchandise <% anarray(1) = "Second string." %>
Sponsorships <% anarray(2) = "Third string." %>
Testimonials <% Erase anarray %>

http://www.devguru.com/Technologies/vbscript/quickref/erase.html (1 of 2) [29/07/2002 12:27:11]


DevGuru VBScript Statement: Erase

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/erase.html (2 of 2) [29/07/2002 12:27:11]


DevGuru STATEMENT: Execute

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Execute
JavaScript
Jet SQL Execute (String)
VBScript
WML The Execute statement takes a single string argument, interprets it as a VBScript statement or
WMLScript sequence of statements, and executes these statements in the current context. No value is
WSH returned. If you wish to evaluate an expression (which returns a value) use the Eval function
XHTML instead.
XML DOM
XSLT To pass multiple statements to the Execute function you should use colons or line-breaks as
Features separators.
Ask DevGuru
ASP Resources Unlike the Eval function, Execute interprets all "=" operators as assignments rather than
HTML Color Chart comparisons.
Find the Bug
Knowledge Base Code:
Links <%
Tips of the Week Execute("Call MySub 4, strArg2")
T-SQL Syntax Charts %>
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/execute.html (1 of 2) [29/07/2002 12:27:14]


DevGuru STATEMENT: Execute

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/execute.html (2 of 2) [29/07/2002 12:27:14]


DevGuru VBScript Statement: Exit

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Exit
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Exit
WMLScript
WSH The Exit statement allows you to exit from inside a block of code such as a conditional
XHTML statement (Do ...Loop, For ... Next, For Each ... Next) or a procedure (Function, Sub) before
XML DOM it would normally be completed.
XSLT
Features
Ask DevGuru
ASP Resources This allows you to exit from inside a Do Until ... Loop.
HTML Color Chart
Find the Bug Code:
Knowledge Base <% Exit Do %>
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials This allows you to exit from inside a Do While ... Loop.
Products
Code:
dgCalendar
<% Exit Do %>
dgCharge
dgChart
This allows you to exit from inside a For ... Next.
dgEncrypt
dgFileUpload
dgReport
Code:
dgSort <% Exit For %>
dgTree
This allows you to exit from inside a For Each ... Next.
Site
Authoring
Code:
Coming Soon
<% Exit For %>
DevGuru Resume
Errata
This allows you to exit from inside a Function.
Link to Us
Merchandise
Code:
Sponsorships
<% Exit Function %>
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/exit.html (1 of 2) [29/07/2002 12:27:16]


DevGuru VBScript Statement: Exit

What's New This allows you to exit from inside a Sub.


Partners
Code Project Code:
DevelopersDex <% Exit Sub %>
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/exit.html (2 of 2) [29/07/2002 12:27:16]


DevGuru VBScript Statement: For

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: For
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML For . . . Next
WMLScript
WSH The For conditional statement repeats a block of code a specified number of times.
XHTML
XML DOM You must end all For statements with Next or you will get an error message. You can place
XSLT For statements inside of other conditional statements. You can use Exit For statements to exit
Features out of a For loop. The keyword Step allows you to loop through a For statement in any size of
Ask DevGuru increment.
ASP Resources
HTML Color Chart Code:
Find the Bug <%
Knowledge Base For i = 1 To 100
Links Rem You can place all of the code you desire inside a For loop
Tips of the Week Next
T-SQL Syntax Charts %>
Tutorials
Products <%
dgCalendar For k = 100 To 1 Step -1
dgCharge Rem You can place all of the code you desire inside a For loop
dgChart Next
dgEncrypt %>
dgFileUpload
dgReport <%
dgSort For mynum = 200 To 200000 Step 200
dgTree Rem You can place all of the code you desire inside a For loop
Site Next
Authoring
%>
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/forloop.html (1 of 2) [29/07/2002 12:27:18]


DevGuru VBScript Statement: For

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/forloop.html (2 of 2) [29/07/2002 12:27:18]


DevGuru VBScript Statement: For Each

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: For Each
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML For Each . . . Next
WMLScript
WSH The For Each conditional statement repeats a block of code for each element of an array or a
XHTML collection of data.
XML DOM
XSLT You can use Exit For statements to exit out of a For Each loop. You can place For Each
Features statements inside of other conditional statements. You must end all For Each statements with
Ask DevGuru Next or you will get an error message.
ASP Resources
HTML Color Chart In the example, the variable i will assume the value of each element in the array, one at a time,
Find the Bug in order, from the first element in the array up to the last element actually being used.
Knowledge Base
Links Code:
Tips of the Week <%
T-SQL Syntax Charts For Each i in myarray
Tutorials Rem You can place all of the code you desire inside a For Each loop
Products Next
dgCalendar %>
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/foreach.html (1 of 2) [29/07/2002 12:27:20]


DevGuru VBScript Statement: For Each

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/foreach.html (2 of 2) [29/07/2002 12:27:20]


DevGuru VBScript Statement: Function

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Function
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Function . . . End Function
WMLScript
WSH The Function statement creates a function, assigns a name, and allows you to list the
XHTML arguments (if any) which are to be passed into the function.
XML DOM
XSLT The major difference between a function and a subroutine, is that a function can return a value
Features back to where it was called from. The returned value must be assigned to the function name (or
Ask DevGuru Set if it is an object) somewhere inside the function.
ASP Resources
HTML Color Chart However, you do not not have to assign or Set a return value.
Find the Bug
Knowledge Base As an option, functions can be declared Private or Public (the default). One option for leaving
Links a Function is to use Exit statements. You can call other functions or subroutines from within a
Tips of the Week function (nesting). You must end every function with End Function or you will get an error
T-SQL Syntax Charts message.
Tutorials
Products Code:
dgCalendar <%
dgCharge Function aardvark
dgChart Rem you can place all of the code you desire inside a function
dgEncrypt End Function
dgFileUpload %>
dgReport
dgSort Code:
dgTree <% Private Function aardvark
Site Rem you can place all of the code you desire inside a function
Authoring End Function
Coming Soon %>
DevGuru Resume
Errata You can list more than one argument in the function.
Link to Us
Merchandise Code:
Sponsorships <%
Testimonials Function aardvark(myvar1, myvar2, mynumber, myarray)

http://www.devguru.com/Technologies/vbscript/quickref/function.html (1 of 2) [29/07/2002 12:27:22]


DevGuru VBScript Statement: Function

What's New Rem you can place all of the code you desire inside a function
Partners End Function
Code Project %>
DevelopersDex
Prog. Heaven When you call a function that is assigned to a variable and it has one or more arguments, you
Tek-Tips Forum must enclosed the arguments inside parentheses, otherwise you will get an error.
TopXML
VBXML.COM Code:
VisualBuilder.com <%
W3Schools returnval = aardvark(myvar1, myvar2, mynumber, myarray)
XMLPitstop %>
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/function.html (2 of 2) [29/07/2002 12:27:22]


DevGuru VBScript Statement: If Then Else

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: If ... Then ... Else
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML If . . . Then
WMLScript
WSH The If conditional statement executes groups of statements only when a single test condition is
XHTML True.
XML DOM
XSLT You can place If statements inside of other conditional statements. You must end all If
Features statements with End If or you will get an error message. Also, the Then must be on the same
Ask DevGuru line as the If.
ASP Resources
HTML Color Chart Code:
Find the Bug <%
Knowledge Base If mydate = "6/26/1943" Then
Links Rem You can place any code you desire here
Tips of the Week End If
T-SQL Syntax Charts %>
Tutorials
Products Code:
dgCalendar <%
dgCharge If somenumber < 71 Then
dgChart Rem You can place any code you desire here
dgEncrypt End If
dgFileUpload %>
dgReport
dgSort If . . . Then . . . Else
dgTree
Site The If part of the If ... Else statement conditionally executes groups of statements only when a
Authoring single test condition is True.
Coming Soon
DevGuru Resume The Else part of the If ... Else statement conditionally executes groups of statements only
Errata when the test If condition is False.
Link to Us
Merchandise You can place If ... Else statements inside of other conditional statements. You must end all If
Sponsorships ...Else statements with End If or you will get an error message. Also, the Then must be on the
Testimonials same line as the If.

http://www.devguru.com/Technologies/vbscript/quickref/if.html (1 of 2) [29/07/2002 12:27:24]


DevGuru VBScript Statement: If Then Else

What's New
Partners Code:
Code Project <%
DevelopersDex If somenumber < 71 Then
Prog. Heaven Rem You can place any code you desire here
Tek-Tips Forum Else
TopXML Rem You can place any code you desire here
VBXML.COM End If
VisualBuilder.com %>
W3Schools
XMLPitstop If . . . Then . . . ElseIf
ZVON.org
Search Us! The If ... ElseIf statements allows you to test multiple conditions.

The If part of the If ... ElseIf statement conditionally executes groups of statements only when
the test condition is True.

The ElseIf part of the If ... ElseIf statement conditionally executes groups of statements only
when the test If condition is False and the test condition for that specific ElseIf part is True.

You can place If ... ElseIf statements inside of other conditional statements. You must end all If
...ElseIf statements with End If or you will get an error message. Also, the Then must be on
the same lines as the If and the ElseIf.

Code:
<%
If somenumber < 43 Then
Rem You can place any code you desire here
ElseIf somenumber < 77 Then
Rem You can place any code you desire here
ElseIf somenumber < 94 Then
Rem You can place any code you desire here
End If
%>

Code:
<%
If somenumber < 43 Then
Rem You can place any code you desire here
ElseIf somenumber < 77 Then
Rem You can place any code you desire here
ElseIf somenumber < 94 Then
Rem You can place any code you desire here
Else
Rem You can place any code you desire here
End If
%>

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/if.html (2 of 2) [29/07/2002 12:27:24]


DevGuru VBScript Statement: On Error

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: On Error
JavaScript
Jet SQL
VBScript
Implemented in version 1.0
WML
WMLScript
On Error Resume Next
WSH
On Error GoTo 0
XHTML
XML DOM
The On Error Resume Next statement gives you a limited amount of error handling control by
XSLT
preventing program interruptions from runtime errors. When an error occurs, by using this
Features statement, the line of code containing the error is simply skipped over and the program
Ask DevGuru continues running.
ASP Resources
HTML Color Chart Note that the error is not corrected, just ignored, and an error message is not displayed. Of
Find the Bug course, your program may still crash or give erroneous output if the error involves a value
Knowledge Base required to successfully execute later portions of your code.
Links
Tips of the Week
Code:
T-SQL Syntax Charts
<% On Error Resume Next %>
Tutorials
Products The On Error GoTo 0 statement is used to disable error handling.
dgCalendar
dgCharge Code:
dgChart <% On Error GoTo 0 %>
dgEncrypt
dgFileUpload If you wish to know whether an error has occurred and of what type, you can insert the
dgReport following code.
dgSort
dgTree Code:
Site <% If Err.Number <> 0 Then %>
Authoring <% =Err.Number%>
Coming Soon <% Err.Clear %>
DevGuru Resume <% End If %>
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/onerror.html (1 of 2) [29/07/2002 12:27:26]


DevGuru VBScript Statement: On Error

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/onerror.html (2 of 2) [29/07/2002 12:27:26]


DevGuru VBScript Statement: Private

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Private
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Private
WMLScript
WSH The Private statement is used to declare a new variable or array. You can declare more than
XHTML one variable and/or array at a time. Memory is also allocated. You cannot declare a variable
XML DOM and assign a value to it at the same time.
XSLT
Features If declared within a script, the results are the same as using Dim or Public, the private variable
Ask DevGuru is available for use in the entire script. If declared in a Class, the private variable or array is not
ASP Resources available as a public property of the Class.
HTML Color Chart
Find the Bug Code:
Knowledge Base <%
Links Private MyNumber
Tips of the Week %>
T-SQL Syntax Charts
Tutorials <%
' First declare
Products
Private MyNumber
dgCalendar
' Then assign a value
dgCharge
MyNumber = 1895.405
dgChart
%>
dgEncrypt
dgFileUpload
<%
dgReport
Private SomeNumber, MyVar, AnotherString
dgSort
%>
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/private.html (1 of 2) [29/07/2002 12:27:29]


DevGuru VBScript Statement: Private

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/private.html (2 of 2) [29/07/2002 12:27:29]


DevGuru VBScript Statement: Property Get

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Property Get
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML Property Get ... End Property
WMLScript
WSH The Property Get statement block allows you to perform a procedure that will return the value
XHTML of a property.
XML DOM
XSLT The Property Get statement block can only be used inside a Class statement block and
Features cannot be used inside of any other procedure. There are two other related statements that also
Ask DevGuru can only be used within a Class block, Property Let and Property Set that, respectively,
ASP Resources permit you to assign the value of a property and to set a reference to an object.
HTML Color Chart
Find the Bug The Property Get statement allows you to declare the name of the procedure, to accept and
Knowledge Base change the values of optional arguments, and to perform a series of statements that ultimately
Links return the value of a property.
Tips of the Week
T-SQL Syntax Charts By default, the Property Get procedure is Public, but you can declare it to be Private. You
Tutorials can use the optional Exit Property statement to immediately exit the from inside the Property
Products Get procedure, but do not forget to assign the return value before doing such an exit.
dgCalendar
dgCharge Note how the returned value is assigned to the procedure name, "ProcedureName" in the
dgChart syntax example. It can be assigned from an expression or set to an object.
dgEncrypt
dgFileUpload The End Property is required.
dgReport
dgSort Syntax:
dgTree
Site [ Public | Private ] Property Get ProcedureName [arguments, ..., ...]
Authoring Rem You may place code here
Coming Soon [ ProcedureName = expression | Set ProcedureName = expression ]
DevGuru Resume [ Exit Property ]
Errata Rem You may place code here
Link to Us [ ProcedureName = expression | Set ProcedureName = expression ]
Merchandise End Property
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/propertyget.html (1 of 2) [29/07/2002 12:27:31]


DevGuru VBScript Statement: Property Get

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/propertyget.html (2 of 2) [29/07/2002 12:27:31]


DevGuru VBScript Statement: Property Let

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Property Let
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML Property Let ... End Property
WMLScript
WSH The Property Let statement block allows you to perform a procedure that assigns the value of
XHTML a property.
XML DOM
XSLT The Property Let statement block can only be used inside a Class statement block and
Features cannot be used inside of any other procedure. There are two other related statements that also
Ask DevGuru can only be used within a Class block, Property Get and Property Set that, respectively,
ASP Resources permit you to return the value of a property and to set a reference to an object.
HTML Color Chart
Find the Bug The Property Let statement allows you to declare the name of the procedure, to accept and
Knowledge Base change the values of optional arguments, and to perform a series of statements that ultimately
Links assign the value of the property.
Tips of the Week
T-SQL Syntax Charts There is one mandatory argument. You must give the name of a variable to which the value is
Tutorials to be assigned. This same name must also appear on the right side of the calling expression.
Products (i.e., the name "VariableName" is used in the syntax example.)
dgCalendar
dgCharge By default, the Property Let procedure is Public, but you can declare it to be Private. You can
dgChart use the optional Exit Property statement to immediately exit the from inside the Property Let
dgEncrypt procedure.
dgFileUpload
dgReport The End Property is required.
dgSort
dgTree Syntax:
Site
Authoring [ Public | Private ] Property Let ProcedureName ( [arguments, ..., ...] VariableName )
Coming Soon Rem You may place code here
DevGuru Resume [ Exit Property ]
Errata Rem You may place code here
Link to Us End Property
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/propertylet.html (1 of 2) [29/07/2002 12:27:33]


DevGuru VBScript Statement: Property Let

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/propertylet.html (2 of 2) [29/07/2002 12:27:33]


DevGuru VBScript Statement: Property Set

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Property Set
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML Property Set ... End Property
WMLScript
WSH The Property Set statement block allows you to perform a procedure that sets a reference to
XHTML an object.
XML DOM
XSLT The Property Set statement block can only be used inside a Class statement block and
Features cannot be used inside of any other procedure. There are two other related statements that also
Ask DevGuru can only be used within a Class block, Property Get and Property Let that, respectively,
ASP Resources permit you to return the value of a property and to assign the value of a property.
HTML Color Chart
Find the Bug The Property Set statement allows you to declare the name of the procedure, to accept and
Knowledge Base change the values of optional arguments, and to perform a series of statements that ultimately
Links sets the reference to the object.
Tips of the Week
T-SQL Syntax Charts There is one mandatory argument. You must give the name of a reference variable to which
Tutorials the value is to be assigned. This same name must be used on the right side of the object
Products reference assignment. (i.e., the name "ReferenceName" is used in the syntax example.)
dgCalendar
dgCharge By default, the Property Set procedure is Public, but you can declare it to be Private. You can
dgChart use the optional Exit Property statement to immediately exit the from inside the Property Set
dgEncrypt procedure.
dgFileUpload
dgReport The End Property is required.
dgSort
dgTree Syntax:
Site
Authoring [ Public | Private ] Property Set ProcedureName ( [arguments, ..., ...] ReferenceName )
Coming Soon Rem You may place code here
DevGuru Resume [ Exit Property ]
Errata Rem You may place code here
Link to Us End Property
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/propertyset.html (1 of 2) [29/07/2002 12:27:35]


DevGuru VBScript Statement: Property Set

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/propertyset.html (2 of 2) [29/07/2002 12:27:35]


DevGuru VBScript Statement: Public

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Public
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Public
WMLScript
WSH The Public statement is used to declare a new public variable or array. You can declare more
XHTML than one variable and/or array at a time. Memory is also allocated. You cannot declare a
XML DOM variable and assign a value to it at the same time.
XSLT
Features The purpose of Public has changed with the addition of Class to VBScript. The
Ask DevGuru recommendation is to only use Public inside a Class. A variable declared using Public in a
ASP Resources Class becomes a public property of that Class. That means that other code contained in the
HTML Color Chart same Class can access the variable.
Find the Bug
Knowledge Base If declared within a script, the results are the same as using Dim or Private, the public variable
Links or array is available for use in the entire script.
Tips of the Week
T-SQL Syntax Charts Code:
Tutorials <%
Products Public YourNumber
%>
dgCalendar
dgCharge
<%
dgChart
' First declare
dgEncrypt
Public YourNumber
dgFileUpload
' Then assign a value
dgReport
YourNumber = 1895.405
dgSort
%>
dgTree
Site <%
Authoring Public SomeNumber, MyVar, AnotherString
Coming Soon %>
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/public.html (1 of 2) [29/07/2002 12:27:37]


DevGuru VBScript Statement: Public

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/public.html (2 of 2) [29/07/2002 12:27:37]


DevGuru VBScript Statement: Randomize

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Randomize
JavaScript
Jet SQL Randomize
VBScript
WML The Randomize statement gives the Rnd function a new seed value for
WMLScript generating random numbers.
WSH
XHTML Code:
XML DOM <% Randomize %>
XSLT <% =Rnd() %>
Features
Ask DevGuru Output:
ASP Resources 0.7953455
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/randomize.html (1 of 2) [29/07/2002 12:27:39]


DevGuru VBScript Statement: Randomize

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/randomize.html (2 of 2) [29/07/2002 12:27:39]


DevGuru VBScript Statement: Rem

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Rem
JavaScript
Jet SQL Rem
VBScript
WML The Rem statement allow you to insert comments into your
WMLScript code.
WSH
XHTML Code:
XML DOM <% Rem This is one of two ways to comment in VBScript %>
XSLT <% ' This is the second way %>
Features
Ask DevGuru
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/rem.html (1 of 2) [29/07/2002 12:27:42]


DevGuru VBScript Statement: Rem

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/rem.html (2 of 2) [29/07/2002 12:27:42]


DevGuru VBScript Statement: Select Case

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Select Case
JavaScript
Jet SQL Select Case
VBScript
WML The Select Case conditional statement selectively executes different groups of code by
WMLScript comparing a variable to a Case (a series of conditions). If one of the cases (conditions) is
WSH satisfied, then the code associated with that case is executed.
XHTML
XML DOM You may specify multiple, comma-delimited conditions for each Case as in the first example
XSLT below. If there not is a match, then the Case is skipped over and the next Case is considered,
Features and so on for each Case.
Ask DevGuru
ASP Resources Note that it is quite possible that none of the cases will be satisfied. Therefore, you may wish to
HTML Color Chart use the optional Case Else statement. It will only execute if none of the other conditions match.
Find the Bug
Knowledge Base You must end the Select Case statement with End Select or you will get an error message.
Links
Tips of the Week Code:
T-SQL Syntax Charts <%
Tutorials Select Case finalnumber
Products Case 1, 5
dgCalendar result = "The result is 1 or 5"
dgCharge Case 2
dgChart result = "The result is 2"
dgEncrypt Case 3
dgFileUpload result = "The result is 3"
dgReport End Select
dgSort %>
dgTree
Site
Authoring
Code:
Coming Soon
DevGuru Resume
<%
Errata
Select Case firstname
Link to Us Case "Brenn"
Merchandise Welcome = "Hello Brenn"
Sponsorships Case "Fred"
Testimonials Welcome = "Hello Fred"
Case "Susan"

http://www.devguru.com/Technologies/vbscript/quickref/selectcase.html (1 of 2) [29/07/2002 12:27:44]


DevGuru VBScript Statement: Select Case

What's New Welcome = "Hello Susan"


Partners Case Else
Code Project Welcome = "Hello world"
DevelopersDex End Select
Prog. Heaven %>
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/selectcase.html (2 of 2) [29/07/2002 12:27:44]


DevGuru VBScript Statement: Set

Quick References
ADO All Objects
ASP
CSS2
HTML STATEMENT: Set
JavaScript
Jet SQL Set
VBScript
WML The Set statement assigns the object reference to a variable or property. (i.e.,
WMLScript create an instance of a specific object)
WSH
XHTML The keyword New is used in conjunction with Set to create an instance of a Class
XML DOM or RegExp.
XSLT
Features The keyword Nothing is used to unassign the object reference from the variable
Ask DevGuru or property.
ASP Resources
HTML Color Chart Code:
Find the Bug <%
Knowledge Base Dim Anyvariable
Links Set Anyvariable = Server.CreateObject("Scripting.FileSystemObject")
Tips of the Week %>
T-SQL Syntax Charts
Tutorials <%
Products Dim SearchPattern
dgCalendar Set SearchPattern = New RegExp
dgCharge %>
dgChart
dgEncrypt <%
dgFileUpload Set Anyvariable = Nothing
dgReport Set SearchPattern = Nothing
dgSort %>
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/set.html (1 of 2) [29/07/2002 12:27:46]


DevGuru VBScript Statement: Set

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/set.html (2 of 2) [29/07/2002 12:27:46]


DevGuru VBScript Statement: Sub

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Sub
JavaScript
Jet SQL Sub
VBScript
WML The Sub statement creates a subroutine, assigns a name, and allows you to list arguments
WMLScript which are to be passed into the subroutine.
WSH
XHTML The major difference between a subroutine and a function, is that a subroutine cannot return
XML DOM any value back to where it was called from.
XSLT
Features As an option, subroutines can be declared Private or Public. You can call other subroutines
Ask DevGuru and functions from within a subroutine (nesting). You must end every subroutine with End Sub
ASP Resources or you will get an error message. One option for leaving a subroutine is to use Exit statements.
HTML Color Chart
Find the Bug Code:
Knowledge Base <% Sub aardvark %>
Links <% Rem you can place all of the code you desire inside a subroutine %>
Tips of the Week <% End Sub %>
T-SQL Syntax Charts
Tutorials Code:
Products <% Private Sub aardvark %>
dgCalendar <% Rem you can place all of the code you desire inside a subroutine %>
dgCharge <% End Sub %>
dgChart
dgEncrypt You can list more than one argument in the subroutine.
dgFileUpload
dgReport Code:
dgSort <%
dgTree Sub aardvark(myvar1, myvar2, mynumber, myarray)
Site Rem you can place all of the code you desire inside a subroutine
Authoring
End Sub
Coming Soon %>
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/sub.html (1 of 2) [29/07/2002 12:27:48]


DevGuru VBScript Statement: Sub

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/sub.html (2 of 2) [29/07/2002 12:27:48]


DevGuru VBScript Statement: While

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: While
JavaScript
Jet SQL While . . . WEnd
VBScript
WML The While conditional statement repeats a block of code as long as a conditional test is True.
WMLScript
WSH You must end While statements with WEnd or you will get an error message. You can place
XHTML While statements inside of other conditional statements.
XML DOM
XSLT Code:
Features <%
Ask DevGuru While testnumber = 1000
ASP Resources Rem You can place all of the code you desire inside a While loop
HTML Color Chart WEnd
Find the Bug %>
Knowledge Base
Links Code:
Tips of the Week <%
T-SQL Syntax Charts While Hour(Time) < 6
Tutorials Rem You can place all of the code you desire inside a While loop
Products WEnd
dgCalendar %>
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/while.html (1 of 2) [29/07/2002 12:27:50]


DevGuru VBScript Statement: While

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/while.html (2 of 2) [29/07/2002 12:27:50]


DevGuru VBScript Statement: With End With

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: With ... End With
JavaScript
Jet SQL
VBScript
WML With object
WMLScript any legal code
WSH End With
XHTML
XML DOM Implemented in version 5.0
XSLT
Features The With statement allows you to execute code on the named object. It is very important to
Ask DevGuru understand that you can only specify a single object to be acted upon. You cannot list several
ASP Resources objects.
HTML Color Chart
Find the Bug You can nest With statements inside of other With statements or inside other conditional
Knowledge Base statements, such as an If Else. However, do not jump into or out of With ... End With blocks of
Links code. The problem is that either the With or End With portion of the statement may not be
Tips of the Week executed and this could cause errors or generate erroneous results.
T-SQL Syntax Charts
Tutorials Between the object name and End With, you may place any legal block of VBScript code. For
Products example, you could place statements assigning values to the properties of the designated
dgCalendar object, as shown below.
dgCharge
dgChart Code:
dgEncrypt <%
dgFileUpload With CatObject
dgReport Rem assign properties
dgSort .CatName = "Amy"
dgTree .CatAge = 3
Site .CatColor = "black, orange, white"
End With
Authoring
%>
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/with.html (1 of 2) [29/07/2002 12:27:52]


DevGuru VBScript Statement: With End With

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/with.html (2 of 2) [29/07/2002 12:27:52]


DevGuru VBScript Statement: '

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: '
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML '
WMLScript
WSH The ' statement allows you to insert comments into your code.
XHTML
XML DOM Code:
XSLT <% ' This is one of two ways to comment in VBScript %>
Features <% Rem This is the other way %>
Ask DevGuru
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/rem2.html (1 of 2) [29/07/2002 12:27:54]


DevGuru VBScript Statement: '

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/rem2.html (2 of 2) [29/07/2002 12:27:54]


DevGuru VBScript Function: Abs

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Abs()
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Abs(Number)
WMLScript
WSH The Abs function returns the absolute value for a number.
XHTML
XML DOM Negative numbers become positive. Positive numbers remain
XSLT positive.
Features
Ask DevGuru Code:
ASP Resources <% =Abs(-127.89) %>
HTML Color Chart
Find the Bug Output:
Knowledge Base 127.89
Links
Tips of the Week Code:
T-SQL Syntax Charts <% =Abs(127.89) %>
Tutorials
Products Output:
dgCalendar 127.89
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/abs.html (1 of 2) [29/07/2002 12:27:59]


DevGuru VBScript Function: Abs

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/abs.html (2 of 2) [29/07/2002 12:27:59]


DevGuru VBScript Function: Array

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Array( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML Array(List)
WMLScript
WSH The Array function is used to create a static one-dimension array. You cannot declare a
XHTML dynamic array using the Array function.
XML DOM
XSLT Note that the first element in an array is always labeled zero, for example,
Features myarray(0).
Ask DevGuru
ASP Resources The List argument is a listing of values that will become the elements of the array.
HTML Color Chart
Find the Bug Code:
Knowledge Base <% myarray = array("A", "B", "C", "D") %>
Links <% =myarray(0) %>
Tips of the Week <% =myarray(1) %>
T-SQL Syntax Charts <% =myarray(2) %>
Tutorials <% =myarray(3) %>
Products
dgCalendar Output:
dgCharge A
dgChart B
dgEncrypt C
dgFileUpload D
dgReport
dgSort Code:
dgTree <% myarray = array(111, 222, 333, 444, 555) %>
Site <% =myarray(0) %>
Authoring
<% =myarray(1) %>
Coming Soon <% =myarray(2) %>
DevGuru Resume <% =myarray(3) %>
Errata <% =myarray(4) %>
Link to Us
Merchandise Output:
Sponsorships 111
Testimonials 222
333

http://www.devguru.com/Technologies/vbscript/quickref/array.html (1 of 2) [29/07/2002 12:28:01]


DevGuru VBScript Function: Array

What's New 444


Partners 555
Code Project
DevelopersDex A dynamic array is declared using the Dim and the ReDim statements. First, you use the Dim
Prog. Heaven statement to declare the dynamic array by using empty parenthesis. Then, at a later point in
Tek-Tips Forum your program, you use the ReDim statement to declare the number of elements. In fact, you
TopXML can re-declare a dynamic array as many times as you desire.
VBXML.COM
VisualBuilder.com
Code:
W3Schools
<%
XMLPitstop
Dim SomeArray()
ZVON.org
...
Search Us!
ReDim SomeArray(22)
...
ReDim SomeArray(500)
%>

Arrays can have up to sixty dimensions. If you wish to create a multiple-dimension array, you
need to declare it using the Dim statement. For example, the following code creates a three
dimensional array. The first dimension has 23 elements, the second dimension has 15
elements and the third dimension has 201 elements. Therefore, there are a total of 23x15x201
= 69345 elements in this array.

The number of dimensions that you can create is limited by the available memory. If you
exceed the available memory while declaring an array, you will get an error message.

Code:
<% Dim ThreeDimensionArray(22, 14, 200) %>

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/array.html (2 of 2) [29/07/2002 12:28:01]


DevGuru VBScript Function: Asc

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Asc()
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Asc(String)
WMLScript
WSH The Asc function returns the ANSI character code value for the first
XHTML character in a string.
XML DOM
XSLT In these two examples, note that the ANSI value is returned only for the
Features "a".
Ask DevGuru
ASP Resources Code:
HTML Color Chart <% =Asc("abcde fghij klmno pqrst uvwxyz") %>
Find the Bug
Knowledge Base Output:
Links 97
Tips of the Week
T-SQL Syntax Charts Code:
Tutorials <% =Asc("a") %>
Products
dgCalendar Output:
dgCharge 97
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/asc.html (1 of 2) [29/07/2002 12:28:03]


DevGuru VBScript Function: Asc

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/asc.html (2 of 2) [29/07/2002 12:28:03]


DevGuru VBScript Function: Atn

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Atn( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Atn(Number)
WMLScript
WSH The Atn function returns the arctangent for a number.
XHTML
XML DOM Code:
XSLT <% =Atn(45.0) %>
Features
Ask DevGuru Output:
ASP Resources 1.54857776146818
HTML Color Chart
Find the Bug You can also use a negative number.
Knowledge Base
Links Code:
Tips of the Week <% =Atn(-45.0) %>
T-SQL Syntax Charts
Tutorials Output:
Products -1.54857776146818
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/atn.html (1 of 2) [29/07/2002 12:28:04]


DevGuru VBScript Function: Atn

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/atn.html (2 of 2) [29/07/2002 12:28:04]


DevGuru VBScript Function: CBool

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: CBool( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML You can determine the expression subtype by using the function VarType( ).
WMLScript
WSH CBool(Number)
XHTML
XML DOM The CBool function converts any number to the variant of subtype Boolean.
XSLT
Features The output for Boolean is either true or false. If the conversion is successful, the output will be
Ask DevGuru true. If the conversion fails, the output will be false or an error message.
ASP Resources
HTML Color Chart Code:
Find the Bug <% anynumber=7.77 %>
Knowledge Base <% =CBool(anynumber) %>
Links
Tips of the Week Output:
T-SQL Syntax Charts True
Tutorials
Products Code:
dgCalendar <% notnumber=abc %>
dgCharge <% =CBool(notnumber) %>
dgChart
dgEncrypt Output:
dgFileUpload False
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/cbool.html (1 of 2) [29/07/2002 12:28:07]


DevGuru VBScript Function: CBool

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/cbool.html (2 of 2) [29/07/2002 12:28:08]


DevGuru VBScript Function: CByte

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: CByte( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML You can determine the expression subtype by using the function
WMLScript VarType( ).
WSH
XHTML CByte(Number)
XML DOM
XSLT The CByte function converts any number between 0 and 255 to the
Features variant of subtype Byte.
Ask DevGuru
ASP Resources Code:
HTML Color Chart <% anynumber=(9.876) %>
Find the Bug <% =CByte(anynumber) %>
Knowledge Base
Links Output:
Tips of the Week 10
T-SQL Syntax Charts
Tutorials Code:
Products <% anynumber=(255) %>
dgCalendar <% =CByte(anynumber) %>
dgCharge
dgChart Output:
dgEncrypt 255
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/cbyte.html (1 of 2) [29/07/2002 12:28:10]


DevGuru VBScript Function: CByte

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/cbyte.html (2 of 2) [29/07/2002 12:28:10]


DevGuru VBScript Function: CCur

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: CCur( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML You can determine the expression subtype by using the function
WMLScript VarType( ).
WSH
XHTML CCur(Number)
XML DOM
XSLT The CCur function converts any number or numeric string to the variant of
Features subtype Currency.
Ask DevGuru
ASP Resources Converts to currency values ranging from
HTML Color Chart -922,337,203,685,477.5808 to 922,337,203,685,477.5807
Find the Bug
Knowledge Base Code:
Links <% anynumber=(12345) %>
Tips of the Week <% =CCur(any_number) %>
T-SQL Syntax Charts
Tutorials Output:
Products 12345
dgCalendar
dgCharge Code:
dgChart <% any_numeric_string=("98765") %>
dgEncrypt <% =CCur(any_numeric_string) %>
dgFileUpload
dgReport Output:
dgSort 98765
dgTree
Site This function rounds off to 4 decimal places.
Authoring
Coming Soon Code:
DevGuru Resume <% anynumber=(55555.123456) %>
Errata <% =CCur(anynumber) %>
Link to Us
Merchandise Output:
Sponsorships 55555.1235
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/ccur.html (1 of 2) [29/07/2002 12:28:12]


DevGuru VBScript Function: CCur

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/ccur.html (2 of 2) [29/07/2002 12:28:12]


DevGuru VBScript Function: CDate

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: CDate( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML You can determine the expression subtype by using the function VarType( ).
WMLScript
WSH CDate(Date)
XHTML
XML DOM The CDate function converts any valid date and time expression to the variant of subtype Date.
XSLT
Features The default date output will be of the format: **/**/** The default time output will be of the
Ask DevGuru format: **:**:** *M Converted date values can range from January 1, 100 to December 31,
ASP Resources 9999
HTML Color Chart
Find the Bug Code:
Knowledge Base <% anydate = "June 26, 1943" %>
Links <% =CDate(anydate) %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials 6/26/43
Products
dgCalendar Code:
dgCharge <% anydate = #6/26/43# %>
dgChart <% =CDate(anydate) %>
dgEncrypt
dgFileUpload Output:
dgReport 6/26/43
dgSort
dgTree Code:
Site <% anytime="2:23:59 PM" %>
Authoring
<% =CDate(anytime) %>
Coming Soon
DevGuru Resume Output:
Errata 2:23:59 PM
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/cdate.html (1 of 2) [29/07/2002 12:28:14]


DevGuru VBScript Function: CDate

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/cdate.html (2 of 2) [29/07/2002 12:28:14]


DevGuru VBScript Function: CDbl

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: CDbl( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML You can determine the expression subtype by using the function VarType( ).
WMLScript
WSH CDbl(Number)
XHTML
XML DOM The CDbl function converts any number to the variant of subtype Double.
XSLT
Features Converted values can range from
Ask DevGuru -1.79769313486232E308 to -4.94065645841247E-324 for negative values and
ASP Resources 4.94065645841247E-324 to 1.79769313486232E308 for positive values.
HTML Color Chart
Find the Bug Code:
Knowledge Base <% anynumber=1234.5 %>
Links <% =CDbl(anynumber) %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials 1234.5
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/cdbl.html (1 of 2) [29/07/2002 12:28:16]


DevGuru VBScript Function: CDbl

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/cdbl.html (2 of 2) [29/07/2002 12:28:16]


DevGuru VBScript Function: Chr

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Chr()
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Chr(ANSIvalue)
WMLScript
WSH The Chr function converts an ANSI character code value to a
XHTML character.
XML DOM
XSLT Code:
Features <% =Chr(98) %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart b
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/chr.html (1 of 2) [29/07/2002 12:28:17]


DevGuru VBScript Function: Chr

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/chr.html (2 of 2) [29/07/2002 12:28:17]


DevGuru VBScript Function: CInt

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: CInt( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML You can determine the expression subtype by using the function
WMLScript VarType( ).
WSH
XHTML CInt(Number)
XML DOM
XSLT The CInt function converts any number to the variant of subtype
Features Integer.
Ask DevGuru
ASP Resources Converts to values ranging from -32,768 to 32,767 The number is
HTML Color Chart rounded off.
Find the Bug
Knowledge Base Code:
Links <% anynumber=1234.567 %>
Tips of the Week <% =CInt(anynumber) %>
T-SQL Syntax Charts
Tutorials Output:
Products 1235
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/cint.html (1 of 2) [29/07/2002 12:28:19]


DevGuru VBScript Function: CInt

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/cint.html (2 of 2) [29/07/2002 12:28:19]


DevGuru VBScript Function: CLng

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: CLng( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML You can determine the expression subtype by using the function VarType( ).
WMLScript
WSH CLng(Number)
XHTML
XML DOM The CLng function converts any number to the variant of subtype Long, with
XSLT floating-point numbers rounded.
Features
Ask DevGuru Converts to integers ranging from -2,147,483,648 to 2,147,483,647
ASP Resources
HTML Color Chart Code:
Find the Bug <% anynumber=1234.6 %>
Knowledge Base <% =CLng(anynumber) %>
Links
Tips of the Week Output:
T-SQL Syntax Charts 1235
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/clng.html (1 of 2) [29/07/2002 12:28:21]


DevGuru VBScript Function: CLng

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/clng.html (2 of 2) [29/07/2002 12:28:21]


DevGuru VBScript Function: Cos

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Cos( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Cos(Number)
WMLScript
WSH The Cos function returns the cosine for a number (angle).
XHTML
XML DOM Code:
XSLT <% =Cos(45.0) %>
Features
Ask DevGuru Output:
ASP Resources 0.52532198881773
HTML Color Chart
Find the Bug You can also use a negative number (angle).
Knowledge Base
Links Code:
Tips of the Week <% =Cos(-45.0) %>
T-SQL Syntax Charts
Tutorials Output:
Products 0.52532198881773
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/cos.html (1 of 2) [29/07/2002 12:28:23]


DevGuru VBScript Function: Cos

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/cos.html (2 of 2) [29/07/2002 12:28:23]


DevGuru VBScript Function: CreateObject

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: CreateObject( )
JavaScript
Jet SQL CreateObject(ServerName.TypeName, RemoteServerName)
VBScript
WML The CreateObject function is used to create an object of the type specified in the argument.
WMLScript
WSH The Set statement assigns the object reference to a variable or property. The keyword
XHTML Nothing is used to unassign the object reference from the variable or property. Good
XML DOM programming techniques require that you unassign all objects before you exit the program.
XSLT
Features There one mandatory and one optional argument.
Ask DevGuru
ASP Resources ServerName.TypeName
HTML Color Chart
Find the Bug ServerName is the name of the application that provides the object. TypeName is the type
Knowledge Base (class) of object to be created.
Links
Tips of the Week RemoteServerName
T-SQL Syntax Charts
Tutorials The optional RemoteServerName argument was added in verson 5.0 and is used to create an
Products object on a remote server. It is the name of the remote server. To use this argument, the
dgCalendar internet security must be turned off.
dgCharge
dgChart In this first example, we create an instance of Microsoft Word.
dgEncrypt
dgFileUpload Code:
dgReport <%
dgSort Set objWrd = CreateObject("Word.Application")
dgTree ...
Site ' Place any code you desire here
Authoring ...
Coming Soon Set objWrd = Nothing
DevGuru Resume %>
Errata
Link to Us In this second example, we create an object on a remote site.
Merchandise
Sponsorships Code:
Testimonials %lt%

http://www.devguru.com/Technologies/vbscript/quickref/createobj.html (1 of 2) [29/07/2002 12:28:25]


DevGuru VBScript Function: CreateObject

What's New Set objFarAway = CreateObject("Word.Application", "FarAwayServerName")


Partners ...
Code Project ' Place any code you desire here
DevelopersDex ...
Prog. Heaven Set objFarAway = Nothing
Tek-Tips Forum %>
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/createobj.html (2 of 2) [29/07/2002 12:28:25]


DevGuru VBScript Function: Csng

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: CSng( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML You can determine the expression subtype by using the function VarType( ).
WMLScript
WSH CSng(Number)
XHTML
XML DOM The CSng function converts any number to the variant of subtype Single.
XSLT
Features Converts to values ranging from
Ask DevGuru -3.402823E38 to -1.401298E-45 for negative values and 1.401298E-45 to
ASP Resources 3.402823E38 for positive values.
HTML Color Chart
Find the Bug Code:
Knowledge Base <% anynumber=5678.123 %>
Links <% =CSng(anynumber) %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials 5678.123
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/csng.html (1 of 2) [29/07/2002 12:28:26]


DevGuru VBScript Function: Csng

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/csng.html (2 of 2) [29/07/2002 12:28:26]


DevGuru VBScript Function: CStr

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: CStr( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML You can determine the expression subtype by using the function VarType( ).
WMLScript
WSH CStr(Expression)
XHTML
XML DOM The CStr function converts an expression into a variant of subtype String.
XSLT
Features If the expression is Boolean, the output is a string containing either true or false. If the
Ask DevGuru expression is a Date, the output is a string using the short-date format. If the expression is
ASP Resources empty, the output is a zero length string. If the expression is an error, the output is a string with
HTML Color Chart the word error followed by the error number. If the expression is numeric, the output string
Find the Bug contains the number. If the expression is Null (does not exist), the output is a runtime error.
Knowledge Base
Links Code:
Tips of the Week <% anyexpression=5678 %>
T-SQL Syntax Charts <% =CStr(anyexpression) %>
Tutorials
Products Output:
dgCalendar 5678
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/cstr.html (1 of 2) [29/07/2002 12:28:28]


DevGuru VBScript Function: CStr

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/cstr.html (2 of 2) [29/07/2002 12:28:28]


DevGuru VBScript Function: Date

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Date
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Date
WMLScript
WSH The Date function returns the current date as determined by your computer system.
XHTML
XML DOM Historically, a two-digit year (MM/DD/YY) was returned. However, courtesy of the millennium, a
XSLT four-digit year is now returned (MM/DD/YYYY). The same applies to the DateValue function.
Features
Ask DevGuru Code:
ASP Resources <% =Date %>
HTML Color Chart
Find the Bug Output:
Knowledge Base 2/16/2001
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/date.html (1 of 2) [29/07/2002 12:28:30]


DevGuru VBScript Function: Date

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/date.html (2 of 2) [29/07/2002 12:28:30]


DevGuru VBScript Function: DateAdd

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: DateAdd( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML DateAdd(Interval, Number, Date)
WMLScript
WSH The DateAdd function adds a time interval to any date.
XHTML
XML DOM There are three mandatory arguments.
XSLT
Features Interval
Ask DevGuru
ASP Resources The Interval argument defines the the type of time interval you wish to add onto the date.
HTML Color Chart
Find the Bug You must place the setting inside double quotes.
Knowledge Base
Links Only the following settings may be used.
Tips of the Week
T-SQL Syntax Charts
Tutorials SETTING DESCRIPTION
Products YYYY Year
dgCalendar
dgCharge
Q Quarter
dgChart
dgEncrypt
M Month
dgFileUpload
dgReport
Y Day Of Year
dgSort
dgTree
D Day
Site
Authoring W WeekDay
Coming Soon
DevGuru Resume WW Week Of Year
Errata
Link to Us H Hour
Merchandise
Sponsorships N Minute
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dateadd.html (1 of 2) [29/07/2002 12:28:32]


DevGuru VBScript Function: DateAdd

What's New
S Second
Partners
Code Project
DevelopersDex
Prog. Heaven Number
Tek-Tips Forum
TopXML The Number argument is a multiplier for the Interval argument (i.e., how many days, weeks,
VBXML.COM months, etc.). If this is a positive number, you will go forward in time. A negative number will go
VisualBuilder.com back in time.
W3Schools
XMLPitstop Date
ZVON.org
Search Us! The Date argument is a date or time.

If you wish to use the current date or time, simply use the Date or the Now functions.

Code:
<% =Date %>
<% =DateAdd("WW", 6, Date) %>

Output:
3/16/99
4/27/99

Code:
<% =Now %>
<% =DateAdd("S", 30, Now) %>

Output:
3/16/99 12:14:00 PM
3/16/99 12:14:30 PM

Code:
<% ="1/1/2001" %>
<% =DateAdd("YYYY", 1000, "1/1/2001") %>

Output:
1/1/2001
1/1/3001

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dateadd.html (2 of 2) [29/07/2002 12:28:32]


DevGuru VBScript Function: DateDiff

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: DateDiff( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML DateDiff(Interval, Date1, Date2, FirstDayofWeek, FirstWeekofYear)
WMLScript
WSH The DateDiff function calculates the amount of time between two different dates.
XHTML
XML DOM There are three mandatory arguments.
XSLT
Features Interval
Ask DevGuru
ASP Resources The Interval argument defines the the type of time interval you wish to use to calculate the
HTML Color Chart time difference.
Find the Bug
Knowledge Base Only the following settings can be used. You must place the setting inside a pair of double
Links quotes.
Tips of the Week
T-SQL Syntax Charts
Tutorials SETTING DESCRIPTION
Products YYYY Year
dgCalendar
dgCharge
Q Quarter
dgChart
dgEncrypt
M Month
dgFileUpload
dgReport
Y Day Of Year
dgSort
dgTree
D Day
Site
Authoring W WeekDay
Coming Soon
DevGuru Resume WW Week Of Year
Errata
Link to Us H Hour
Merchandise
Sponsorships N Minute
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/datediff.html (1 of 3) [29/07/2002 12:28:35]


DevGuru VBScript Function: DateDiff

What's New
S Second
Partners
Code Project
DevelopersDex
Prog. Heaven Date1
Tek-Tips Forum
TopXML The Date1 argument is the first date.
VBXML.COM
VisualBuilder.com Date2
W3Schools
XMLPitstop The Date2 argument is the second date.
ZVON.org
Search Us!
Code:
<%=DateDiff("d", Date, "1/1/2000") %>

Output:
291

The order of the two dates determines if the difference is represented as a positive or negative
value.

Code:
<% olddate = #6/26/43# %>
<% nowdate = Now %>
<% =DateDiff("s", nowdate, olddate) %>

Output:
-3130748108

There are two optional arguments.

FirstDayofWeek

The FirstDayofWeek argument must only use the constants or values defined below in the
Date And Time CONSTANTS.

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 Week of January 1

http://www.devguru.com/Technologies/vbscript/quickref/datediff.html (2 of 3) [29/07/2002 12:28:35]


DevGuru VBScript Function: DateDiff

VBFirstFourDays 2 First week of the year that has at least four days

VBFirstFullWeek 3 First full week of the year

Use the date format of the computer's regionsl


VBUseSystem 0
settings

Use the first full day of the week as defined by the


VBUseSystemDayOfWeek 0
system settings

In this example, Tuesday is defined to be the first day of the week. The output is how many
weeks, which are now defined to start on Tuesday, are left between the current date and
1/1/2001.

Code:
<% =DateDiff("w", Date, "1/1/2001", 3) %>

Output:
93

Code:
<% =DateDiff("w", Date, "1/1/2001", VBTUESDAY) %>

Output:
93

FirstWeekofYear

The FirstWeekofYear argument must only use the constants or values defined in the Date And
Time CONSTANTS which are listed above.

Code:
<% =DateDiff("ww", Date, "1/1/2001", 1, VBFIRSTFOURDAYS)%>

Output:
94

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/datediff.html (3 of 3) [29/07/2002 12:28:35]


DevGuru VBScript Function: DatePart

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: DatePart( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML DatePart(Interval, Date, FirstDayofWeek, FirstWeekofYear)
WMLScript
WSH The DatePart function returns the designated part of the date.
XHTML
XML DOM There are two mandatory arguments.
XSLT
Features Interval
Ask DevGuru
ASP Resources The Interval argument designates the the type of time interval.
HTML Color Chart
Find the Bug Only the following settings may be used. You must place the setting inside a pair of double
Knowledge Base quotes.
Links
Tips of the Week
T-SQL Syntax Charts SETTING DESCRIPTION
Tutorials
YYYY Year
Products
dgCalendar
Q Quarter
dgCharge
dgChart
M Month
dgEncrypt
dgFileUpload
Y Day Of Year
dgReport
dgSort
D Day
dgTree
Site W WeekDay
Authoring
Coming Soon WW Week Of Year
DevGuru Resume
Errata H Hour
Link to Us
Merchandise N Minute
Sponsorships
Testimonials S Second

http://www.devguru.com/Technologies/vbscript/quickref/datepart.html (1 of 3) [29/07/2002 12:28:38]


DevGuru VBScript Function: DatePart

What's New
Partners
Code Project Date
DevelopersDex
Prog. Heaven The Date argument is the date and time you designate.
Tek-Tips Forum
TopXML Code:
VBXML.COM <% =Date %>
VisualBuilder.com <% =DatePart("D", Date) %>
W3Schools
XMLPitstop Output:
ZVON.org 3/16/99
Search Us! 16

The weekday is given as a number from the Date And Time CONSTANTS which are listed
below. In the example, 7 equals Saturday.

Code:
<% =DatePart("W", 1/1/2000) %>

Output:
7

There are two optional arguments.

FirstDayofWeek

The FirstDayofWeek argument must only use the constants or values defined below in the
Date And Time CONSTANTS.

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 Week of January 1

VBFirstFourDays 2 First week of the year thathas at least four days

VBFirstFullWeek 3 First full week of the year

Use the date format of the computer's regionsl


VBUseSystem 0
settings

http://www.devguru.com/Technologies/vbscript/quickref/datepart.html (2 of 3) [29/07/2002 12:28:38]


DevGuru VBScript Function: DatePart

Use the first full day of the week as defined by the


VBUseSystemDayOfWeek 0
system settings

In this example, Tuesday is defined to be the first day of the week. Therefore, Saturday
becomes the 5th day of the week.

Code:
<% =DatePart("W", "1/1/2000", 3) %>

Output:
5

Code:
<% =DatePart("W", "1/1/2000", VBTUESDAY) %>

Output:
5

FirstWeekofYear

The FirstWeekofYear argument must only use the constants or values defined in the Date
And Time CONSTANTS which are listed above.

This example returns how many full 7 day weeks there were in 1999.

Code:
<% =DatePart("WW", "12/31/1999", 1, VBFIRSTFULLWeek) %>

Output:
52

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/datepart.html (3 of 3) [29/07/2002 12:28:38]


DevGuru VBScript Function: DateSerial

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: DateSerial( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML DateSerial(Year, Month, Day)
WMLScript
WSH The DateSerial function converts the arguments into the variant of
XHTML subtype Date.
XML DOM
XSLT There are three mandatory arguments.
Features
Ask DevGuru Year
ASP Resources
HTML Color Chart The Year argument is the year as a string or integer.
Find the Bug
Knowledge Base Month
Links
Tips of the Week The Month argument is the month as a string or integer.
T-SQL Syntax Charts
Tutorials Day
Products
dgCalendar The Day argument is the Day as a string or integer.
dgCharge
dgChart Code:
dgEncrypt <% =DateSerial(1943, 6, 26) %>
dgFileUpload
dgReport Output:
dgSort 6/26/43
dgTree
Site Code:
Authoring <% =DateSerial("43", "6", "26") %>
Coming Soon
DevGuru Resume Output:
Errata 6/26/43
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/dateserial.html (1 of 2) [29/07/2002 12:28:40]


DevGuru VBScript Function: DateSerial

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/dateserial.html (2 of 2) [29/07/2002 12:28:40]


DevGuru VBScript Function: DateValue

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: DateValue( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML DateValue(Date)
WMLScript
WSH The DateValue function converts an argument into the variant of subtype
XHTML Date.
XML DOM
XSLT The Date argument must be a string in valid date format or you will get an
Features error message.
Ask DevGuru
ASP Resources Code:
HTML Color Chart <% mystring = "06/26/1943" %>
Find the Bug <% =DateValue(mystring) %>
Knowledge Base
Links Output:
Tips of the Week 6/26/1943
T-SQL Syntax Charts
Tutorials Code:
Products <% =DateValue("1/1/2001") %>
dgCalendar
dgCharge Output:
dgChart 1/1/2001
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/datevalue.html (1 of 2) [29/07/2002 12:28:42]


DevGuru VBScript Function: DateValue

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/datevalue.html (2 of 2) [29/07/2002 12:28:42]


DevGuru VBScript Function: Day

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Day( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Day(Date)
WMLScript
WSH The Day function returns the number of the current day of the month using any
XHTML valid date expression as an argument.
XML DOM
XSLT You can also use the Date and Now functions as the argument.
Features
Ask DevGuru Code:
ASP Resources <% =Day(Date) %>
HTML Color Chart
Find the Bug Output:
Knowledge Base 16
Links
Tips of the Week Code:
T-SQL Syntax Charts <% =Day("6/26/1943") %>
Tutorials
Products Output:
dgCalendar 26
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/day.html (1 of 2) [29/07/2002 12:28:44]


DevGuru VBScript Function: Day

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/day.html (2 of 2) [29/07/2002 12:28:44]


DevGuru VBScript Function: Eval

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Eval()
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML Eval(Expression)
WMLScript
WSH The Eval function takes a single argument, evaluates it as a VBScript expression, and returns
XHTML the result of this evaluation.
XML DOM
XSLT If the expression is of the form a = b, it is treated as an equality comparison. If the comparison
Features is true, then True is returned. Otherwise, False is returned.
Ask DevGuru
ASP Resources There is a statement, Execute, which is similar in operation to the Eval function. Execute
HTML Color Chart differs in that it interprets a string expression as one or a series of statments to be executed,
Find the Bug and in the fact that it does not return a value.
Knowledge Base
Links Code:
Tips of the Week <%
T-SQL Syntax Charts ThisVar = 5.556
Tutorials AnotherVar = 5.556
Products %>
dgCalendar <% =Eval("ThisVar = AnotherVar") %>
dgCharge
dgChart Output:
dgEncrypt true
dgFileUpload
dgReport Code:
dgSort <% MyVar = Eval("CInt(12345.6789)") %>
dgTree <% =MyVar %>
Site
Authoring
Output:
Coming Soon 12345
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/eval.html (1 of 2) [29/07/2002 12:28:46]


DevGuru VBScript Function: Eval

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/eval.html (2 of 2) [29/07/2002 12:28:46]


DevGuru VBScript Function: Exp

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Exp( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Exp(Number)
WMLScript
WSH The Exp function raises e to the power of a number.
XHTML
XML DOM There is a companion function Log for the reverse operation.
XSLT
Features Code:
Ask DevGuru <% =Exp(3.269) %>
ASP Resources
HTML Color Chart Output:
Find the Bug 26.2850411552082
Knowledge Base
Links You can also use a negative number.
Tips of the Week
T-SQL Syntax Charts Code:
Tutorials <% =Exp(-3.269) %>
Products
dgCalendar Output:
dgCharge 0.038044452511799
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/exp.html (1 of 2) [29/07/2002 12:28:48]


DevGuru VBScript Function: Exp

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/exp.html (2 of 2) [29/07/2002 12:28:48]


DevGuru VBScript Function: Filter

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Filter( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Filter(String, Substring, Include,Compare)
WMLScript
WSH The Filter function searches the elements of a zero-based array, to match a pattern of one or
XHTML more characters, and creates a new array, either with or without the elements containing the
XML DOM matched pattern.
XSLT
Features You can create a zero-based string array by using the Split function. The Join function is used
Ask DevGuru to reassemble the string after applying the Filter function.
ASP Resources
HTML Color Chart
Find the Bug There are two mandatory arguments.
Knowledge Base
Links String
Tips of the Week
T-SQL Syntax Charts The String argument is the name of a zero-based string array.
Tutorials
Products
Substring
dgCalendar
dgCharge
The Substring argument is the pattern of one or more characters that are searched for in the
dgChart
dgEncrypt
array.
dgFileUpload
dgReport Code:
dgSort <% myarray = Split("How now purple cow?") %>
dgTree <% myfilterarray = Filter(myarray, "ow") %>
<% =Join(myfilterarray) %>
Site
Authoring
Output:
Coming Soon
How now cow?
DevGuru Resume
Errata
There are two optional arguments.
Link to Us
Merchandise
Include
Sponsorships
Testimonials
The optional Include argument must only be True or False. If True, the returned array will only

http://www.devguru.com/Technologies/vbscript/quickref/filter.html (1 of 3) [29/07/2002 12:28:50]


DevGuru VBScript Function: Filter

What's New consist of the values that contain the search pattern. If False, the returned array will only
Partners consist of the values that do not contain the search pattern.
Code Project
DevelopersDex Code:
Prog. Heaven <% myarray = Split("How now purple cow?") %>
Tek-Tips Forum <% myfilterarray = Filter(myarray, "ow", True) %>
TopXML <% =Join(myfilterarray) %>
VBXML.COM
VisualBuilder.com Output:
W3Schools How now cow?
XMLPitstop
ZVON.org Code:
Search Us! <% myarray = Split("How now purple cow?") %>
<% myfilterarray = Filter(myarray, "ow", False) %>
<% =Join(myfilterarray) %>

Output:
purple

Compare

The optional Compare argument must only use either the constant or value of the
COMPARISON CONSTANTS.

CONSTANT VALUE DESCRIPTION

VBBinaryCompare 0 Binary comparison

VBTextCompare 1 Text Comparison

VBDataBaseCompare 2 Compare information inside database

In the example, by using VBBinaryCompare, or 0, for the Compare argument, all upper/lower
case differences are obeyed in the search.

Code:
<% myarray = Split("How now purple cow?") %>
<% myfilterarray = Filter(myarray, "OW", True, 0) %>
<% =Join(myfilterarray) %>

Output:
(No output, because no match)

In the example, by using VBTextCompare, or 1, for the Compare argument, all upper/lower
case differences are ignored in the search.

Code:
<% myarray = Split("How now purple cow?") %>
<% myfilterarray = Filter(myarray, "OW", True, VBTextCompare) %>
<% =Join(myfilterarray) %>

Output:
How now cow?

http://www.devguru.com/Technologies/vbscript/quickref/filter.html (2 of 3) [29/07/2002 12:28:50]


DevGuru VBScript Function: Filter

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/filter.html (3 of 3) [29/07/2002 12:28:50]


DevGuru VBScript Function: Fix

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Fix( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Fix(Number)
WMLScript
WSH The Fix function converts a decimal number (floating-point) to an integer number (fix-point).
XHTML
XML DOM There is a companion function Int that also converts to integers. There is one major difference
XSLT between Int and Fix. Int rounds negative numbers down. Fix rounds negative numbers up.
Features
Ask DevGuru Code:
ASP Resources <% =Fix(123.456) %>
HTML Color Chart
Find the Bug Output:
Knowledge Base 123
Links
Tips of the Week Positive numbers are not rounded up. The decimal point and all digits to the right are effectively
T-SQL Syntax Charts chopped off.
Tutorials
Products Code:
dgCalendar <% =Fix(123.899) %>
dgCharge
dgChart Output:
dgEncrypt 123
dgFileUpload
dgReport
dgSort Negative numbers can also be converted. Negative numbers are rounded up (towards more
dgTree positive). The decimal point and all digits to the right are effectively chopped off.
Site
Code:
Authoring
<% =Fix(-123.899) %>
Coming Soon
DevGuru Resume
Output:
Errata
-123
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/fix.html (1 of 2) [29/07/2002 12:28:52]


DevGuru VBScript Function: Fix

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/fix.html (2 of 2) [29/07/2002 12:28:52]


DevGuru VBScript Function: FormatCurrency

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: FormatCurrency( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML FormatCurrency(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit,
WMLScript UseParensForNegativeNumbers, GroupDigit)
WSH
XHTML The FormatCurrency function return a formatted currency value for the numeric expression.
XML DOM
XSLT There is one mandatory argument.
Features
Ask DevGuru Expression
ASP Resources
HTML Color Chart The Expression argument is the number to be converted to a currency format.
Find the Bug
Knowledge Base Code:
Links <% =FormatCurrency(31567) %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials $31,567.00
Products
dgCalendar Note that this function rounds off values.
dgCharge
dgChart Code:
dgEncrypt <% =FormatCurrency(31567.8977) %>
dgFileUpload
dgReport Output:
dgSort $31,567.90
dgTree
Site There are 4 optional arguments.
Authoring
Coming Soon
NumDigitsAfterDecimal
DevGuru Resume The optional NumDigitsAfterDecimal argument allows you to choose the number of digits
Errata after the decimal.
Link to Us
Merchandise Code:
Sponsorships <% =FormatCurrency(31567, 2) %>
Testimonials
Output:

http://www.devguru.com/Technologies/vbscript/quickref/formatcurrency.html (1 of 3) [29/07/2002 12:28:54]


DevGuru VBScript Function: FormatCurrency

What's New $31,567.00


Partners
Code Project IncludeLeadingDigit
DevelopersDex
Prog. Heaven The optional IncludeLeadingDigit argument includes the leading zero.
Tek-Tips Forum
TopXML You must only use the constant or value from the Tristate CONSTANTS for this argument.
VBXML.COM
VisualBuilder.com
W3Schools CONSTANT VALUE DESCRIPTION
XMLPitstop
ZVON.org TristateTrue -1 True, will use options
Search Us!
TristateFalse 0 False, will not use options

TristateUseDefault -2 Use default setting

Code:
<% =FormatCurrency(.77, 2, -1) %>

Output:
$0.77

UseParensForNegativeNumbers

The optional UseParensForNegativeNumber argument replaces a negative sign with


parentheses around the number.

You must only use the constant or value from the Tristate CONSTANTS for this argument.

CONSTANT VALUE DESCRIPTION

TristateTrue -1 True, will use options

TristateFalse 0 False, will not use options

TristateUseDefault -2 Use default setting

Code:
<% =FormatCurrency(-31567, 2, 0, -1) %>

Output:
($31,567.00)

GroupDigit

The optional GroupDigit argument allows the use of the options specified in the Currency tab
in the Regional Settings Properties in the Control Panel.

You must only use the constant or value from the Tristate CONSTANTS for this argument.

http://www.devguru.com/Technologies/vbscript/quickref/formatcurrency.html (2 of 3) [29/07/2002 12:28:54]


DevGuru VBScript Function: FormatCurrency

CONSTANT VALUE DESCRIPTION

TristateTrue -1 True, will use options

TristateFalse 0 False, will not use options

TristateUseDefault -2 Use default setting

Code:
<% =FormatCurrency(31567, 2, 0, -1, -1) %>

Output:
$31,567.00

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/formatcurrency.html (3 of 3) [29/07/2002 12:28:54]


DevGuru VBScript Function: FormatDateTime

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: FormatDateTime( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML FormatDateTime (Date, DateFormat)
WMLScript
WSH The FormatDateTime function formats dates and times. The output format is:
XHTML MM/DD/YYYY
XML DOM
XSLT There is one mandatory argument.
Features
Ask DevGuru Date
ASP Resources
HTML Color Chart The Date argument is any valid date expression.
Find the Bug
Knowledge Base Code:
Links <% =FormatDateTime("6/26/43") %>
Tips of the Week <% =FormatDateTime("15:34") %>
T-SQL Syntax Charts
Tutorials Output:
Products 6/26/1943
dgCalendar 3:34:00 PM
dgCharge
dgChart There is one optional argument.
dgEncrypt
dgFileUpload DateFormat
dgReport
dgSort The optional DateFormat argument must use the constant or value from the Date
dgTree Format CONSTANTS.
Site
Authoring CONSTANT VALUE DESCRIPTION
Coming Soon
DevGuru Resume VBGeneralDate 0 Display the date and time using system settings
Errata
Link to Us
Display the date in long date format
Merchandise VBLongDate 1
Saturday, June 26, 1943
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/formatdatetime.html (1 of 2) [29/07/2002 12:28:56]


DevGuru VBScript Function: FormatDateTime

What's New
Display the date in short date format
Partners VBShortDate 2
6/26/43
Code Project
DevelopersDex
Display the time in long time format
Prog. Heaven VBLongTime 3
Tek-Tips Forum
3:48:01 PM
TopXML
VBXML.COM
Display the time in short time format (24 hour clock)
VBShortTime 4
VisualBuilder.com
15:48
W3Schools
XMLPitstop
ZVON.org Code:
Search Us! <% =FormatDateTime("6/26/1943", 1) %>
<% =FormatDateTime("3:34:00 PM", 4) %>

Output:
Saturday, June 26, 1943
15:34

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/formatdatetime.html (2 of 2) [29/07/2002 12:28:56]


DevGuru VBScript Function: FormatNumber

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: FormatNumber( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML FormatNumber(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit,
WMLScript UseParensForNegativeNumbers, GroupDigit)
WSH
XHTML The FormatNumber function return a formatted number value for the numeric expression.
XML DOM
XSLT There is one mandatory argument.
Features
Ask DevGuru Expression
ASP Resources
HTML Color Chart The Expression argument is the number to be converted to a formatted number.
Find the Bug
Knowledge Base Code:
Links <% =FormatNumber(12345) %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials 12,345.00
Products
dgCalendar Note that this function rounds off values.
dgCharge
dgChart Code:
dgEncrypt <% =FormatNumber(12345.67899) %>
dgFileUpload
dgReport Output:
dgSort 12,345.68
dgTree
Site There are 4 optional arguments.
Authoring
Coming Soon
NumDigitsAfterDecimal
DevGuru Resume
Errata The optional NumDigitsAfterDecimal argument allows you to choose the number of digits
Link to Us after the decimal.
Merchandise
Sponsorships Code:
Testimonials <% =FormatNumber(12345.67899, 4) %>

http://www.devguru.com/Technologies/vbscript/quickref/formatnumber.html (1 of 3) [29/07/2002 12:28:59]


DevGuru VBScript Function: FormatNumber

What's New Output:


Partners 12,345.6790
Code Project
DevelopersDex IncludeLeadingDigit
Prog. Heaven
Tek-Tips Forum The optional IncludeLeadingDigit argument includes the leading zero.
TopXML
VBXML.COM You must only use the constant or value from the Tristate CONSTANTS for this argument.
VisualBuilder.com
W3Schools
XMLPitstop CONSTANT VALUE DESCRIPTION
ZVON.org
Search Us! TristateTrue -1 True, will use options

TristateFalse 0 False, will not use options

TristateUseDefault -2 Use default setting

Code:
<% =FormatNumber(.77, 4, -1) %>

Output:
0.7700

UseParensForNegativeNumbers

The optional UseParensForNegativeNumber argument replaces a negative sign with


parentheses around the number.

You must only use the constant or value from the Tristate CONSTANTS for this argument.

CONSTANT VALUE DESCRIPTION

TristateTrue -1 True, will use options

TristateFalse 0 False, will not use options

TristateUseDefault -2 Use default setting

Code:
<% =FormatNumber(-12345.67899, 2, 0, -1) %>

Output:
(12,345.68)

GroupDigit

The optional GroupDigit argument allows the use of the options specified in the Regional
Settings Properties in the Control Panel to display a number.

You must only use the constant or value from the Tristate CONSTANTS for this argument.

http://www.devguru.com/Technologies/vbscript/quickref/formatnumber.html (2 of 3) [29/07/2002 12:28:59]


DevGuru VBScript Function: FormatNumber

CONSTANT VALUE DESCRIPTION

TristateTrue -1 True, will use options

TristateFalse 0 False, will not use options

TristateUseDefault -2 Use default setting

Code:
<% =FormatNumber(12345.67899, 2, 0, -1, -1) %>

Output:
12,345.68

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/formatnumber.html (3 of 3) [29/07/2002 12:28:59]


DevGuru VBScript Function: FormatPercent

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: FormatPercent( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML FormatPercent(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit,
WMLScript UseParensForNegativeNumbers, GroupDigit)
WSH
XHTML The FormatPercent function return a formatted percent value for the numeric expression with
XML DOM a following percent sign (%). A 1.0 converts to 100% and 0.0 converts to 0%.
XSLT
Features There is one mandatory argument.
Ask DevGuru
ASP Resources Expression
HTML Color Chart
Find the Bug The Expression argument is the number to be converted to a formatted percent.
Knowledge Base
Links Code:
Tips of the Week <% =FormatPercent(.77) %>
T-SQL Syntax Charts
Tutorials Output:
Products 77.00%
dgCalendar
dgCharge Note that this function rounds off values.
dgChart
dgEncrypt Code:
dgFileUpload <% =FormatPercent(.678999) %>
dgReport
dgSort Output:
dgTree 67.90%
Site
Authoring
There are 4 optional arguments.
Coming Soon
DevGuru Resume NumDigitsAfterDecimal
Errata
Link to Us The optional NumDigitsAfterDecimal argument allows you to choose the number of digits
Merchandise after the decimal.
Sponsorships
Testimonials Code:
<% =FormatPercent(.123456789, 4) %>

http://www.devguru.com/Technologies/vbscript/quickref/formatpercent.html (1 of 3) [29/07/2002 12:29:01]


DevGuru VBScript Function: FormatPercent

What's New
Partners Output:
Code Project 12.3457%
DevelopersDex
Prog. Heaven IncludeLeadingDigit
Tek-Tips Forum
TopXML The optional IncludeLeadingDigit argument includes the leading zero.
VBXML.COM
VisualBuilder.com You must only use the constant or value from the Tristate CONSTANTS for this argument.
W3Schools
XMLPitstop
ZVON.org CONSTANT VALUE DESCRIPTION
Search Us!
TristateTrue -1 True, will use options

TristateFalse 0 False, will not use options

TristateUseDefault -2 Use default setting

Code:
<% =FormatPercent(.0098, 4, -1) %>

Output:
0.9800%

UseParensForNegativeNumbers

The optional UseParensForNegativeNumber argument replaces a negative sign with


parentheses around the number.

You must only use the constant or value from the Tristate CONSTANTS for this argument.

CONSTANT VALUE DESCRIPTION

TristateTrue -1 True, will use options

TristateFalse 0 False, will not use options

TristateUseDefault -2 Use default setting

Code:
<% =FormatPercent(-.77, 2, 0, -1) %>

Output:
(77.00%)

GroupDigit

The optional GroupDigit argument allows the use of the options specified in the Regional
Settings Properties in the Control Panel to display a percent.

You must only use the constant or value from the TRISATE CONSTANTS for this argument.

http://www.devguru.com/Technologies/vbscript/quickref/formatpercent.html (2 of 3) [29/07/2002 12:29:01]


DevGuru VBScript Function: FormatPercent

CONSTANT VALUE DESCRIPTION

TristateTrue -1 True, will use options

TristateFalse 0 False, will not use options

TristateUseDefault -2 Use default setting

Code:
<% =FormatPercent(.77, 2, 0, -1, -1) %>

Output:
77.00%

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/formatpercent.html (3 of 3) [29/07/2002 12:29:01]


DevGuru VBScript Function: GetLocale

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: GetLocale()
JavaScript
Jet SQL GetLocale
VBScript
WML The GetLocale function returns the LCID (locale ID).
WMLScript
WSH The LCID is a short string, decimal value, or hex value that uniquely identifies a geographic
XHTML locale. The various geographic locales are based upon the user's language, country, and
XML DOM culture. For example, the locale "English - United States" can be designated as either "en-us",
XSLT or "1033", or "0x0409".
Features
Ask DevGuru This locale information is used to establish user preferences and formats for such things as
ASP Resources alphabets, currency, dates, keyboard layout, and numbers. A list of these locales, and their
HTML Color Chart return values, can be found here.
Find the Bug
Knowledge Base Code:
Links <% =GetLocale() %>
Tips of the Week
T-SQL Syntax Charts
Output:
Tutorials
1033
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/GetLocale.html (1 of 2) [29/07/2002 12:29:03]


DevGuru VBScript Function: GetLocale

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/GetLocale.html (2 of 2) [29/07/2002 12:29:03]


DevGuru Locale ID Reference Chart

Quick References
ADO All Functions
ASP
CSS2
HTML Locale ID (LCID) Reference
JavaScript
Jet SQL
VBScript
Short
Locale Description Hex Value Decimal Value
WML String
WMLScript
WSH Afrikaans af 0x0436 1078
XHTML
XML DOM Albanian sq 0x041C 1052
XSLT
Features Arabic - U.A.E. ar-ae 0x3801 14337
Ask DevGuru
ASP Resources
Arabic - Bahrain ar-bh 0x3C01 15361
HTML Color Chart
Find the Bug
Knowledge Base
Arabic - Algeria ar-dz 0x1401 5121
Links
Tips of the Week Arabic - Egypt ar-eg 0x0C01 3073
T-SQL Syntax Charts
Tutorials Arabic - Iraq ar-iq 0x0801 2049
Products
dgCalendar Arabic - Jordan ar-jo 0x2C01 11265
dgCharge
dgChart Arabic - Kuwait ar-kw 0x3401 13313
dgEncrypt
dgFileUpload
Arabic - Lebanon ar-lb 0x3001 12289
dgReport
dgSort
dgTree Arabic - Libya ar-ly 0x1001 4097
Site
Arabic - Morocco ar-ma 0x1801 6145
Authoring
Coming Soon
DevGuru Resume Arabic - Oman ar-om 0x2001 8193
Errata
Link to Us Arabic - Qatar ar-qa 0x4001 16385
Merchandise
Sponsorships Arabic - Saudia
Testimonials ar-sa 0x0401 1025
Arabia

http://www.devguru.com/Technologies/vbscript/quickref/LCIDchart.html (1 of 6) [29/07/2002 12:29:08]


DevGuru Locale ID Reference Chart

What's New
Arabic - Syria ar-sy 0x2801 10241
Partners
Code Project
DevelopersDex Arabic - Tunisia ar-tn 0x1C01 7169
Prog. Heaven
Tek-Tips Forum Arabic - Yemen ar-ye 0x2401 9217
TopXML
VBXML.COM Basque eu 0x042D 1069
VisualBuilder.com
W3Schools
Belarusian be 0x0423 1059
XMLPitstop
ZVON.org
Search Us! Bulgarian bg 0x0402 1026

Catalan ca 0x0403 1027

Chinese zh 0x0004 4

Chinese - PRC zh-cn 0x0804 2052

Chinese - Hong Kong zh-hk 0x0C04 3076

Chinese - Singapore zh-sg 0x1004 4100

Chinese - Taiwan zh-tw 0x0404 1028

Croatian hr 0x041A 1050

Czech cs 0x0405 1029

Danish da 0x0406 1030

Dutch nl 0x0413 1043

Dutch - Belgium nl-be 0x0813 2067

English en 0x0009 9

English - Australia en-au 0x0C09 3081

English - Belize en-bz 0x2809 10249

English - Canada en-ca 0x1009 4105

English - Ireland en-ie 0x1809 6153

English - Jamaica en-jm 0x2009 8201

English - New
en-nz 0x1409 5129
Zealand

http://www.devguru.com/Technologies/vbscript/quickref/LCIDchart.html (2 of 6) [29/07/2002 12:29:08]


DevGuru Locale ID Reference Chart

English - South Africa en-za 0x1C09 7177

English - Trinidad en-tt 0x2C09 11273

English - United
en-gb 0x0809 2057
Kingdom

English - United
en-us 0x0409 1033
States

Estonian et 0x0425 1061

Farsi fa 0x0429 1065

Finnish fi 0x040B 1035

Faeroese fo 0x0438 1080

French - Standard fr 0x040C 1036

French - Belgium fr-be 0x080C 2060

French - Canada fr-ca 0x0C0C 3084

French - Luxembourg fr-lu 0x140C 5132

French - Switzerland fr-ch 0x100C 4108

Gaelic - Scotland gd 0x043C 1084

German - Standard de 0x0407 1031

German - Austrian de-at 0x0C07 3079

German -
de-li 0x1407 5127
Lichtenstein

German -
de-lu 0x1007 4103
Luxembourg

German -
de-ch 0x0807 2055
Switzerland

Greek el 0x0408 1032

Hebrew he 0x040D 1037

Hindi hi 0x0439 1081

Hungarian hu 0x040E 1038

http://www.devguru.com/Technologies/vbscript/quickref/LCIDchart.html (3 of 6) [29/07/2002 12:29:08]


DevGuru Locale ID Reference Chart

Icelandic is 0x040F 1039

Indonesian in 0x0421 1057

Italian - Standard it 0x0410 1040

Italian - Switzerland it-ch 0x0810 2064

Japanese ja 0x0411 1041

Korean ko 0x0412 1042

Latvian lv 0x0426 1062

Lithuanian lt 0x0427 1063

Macedonian mk 0x042F 1071

Malay - Malaysia ms 0x043E 1086

Maltese mt 0x043A 1082

Norwegian - Bokmål no 0x0414 1044

Polish pl 0x0415 1045

Portuguese -
pt 0x0816 2070
Standard

Portuguese - Brazil pt-br 0x0416 1046

Raeto-Romance rm 0x0417 1047

Romanian ro 0x0418 1048

Romanian - Moldova ro-mo 0x0818 2072

Russian ru 0x0419 1049

Russian - Moldova ru-mo 0x0819 2073

Serbian - Cyrillic sr 0x0C1A 3098

Setsuana tn 0x0432 1074

Slovenian sl 0x0424 1060

Slovak sk 0x041B 1051

http://www.devguru.com/Technologies/vbscript/quickref/LCIDchart.html (4 of 6) [29/07/2002 12:29:08]


DevGuru Locale ID Reference Chart

Sorbian sb 0x042E 1070

Spanish - Standard es 0x040A 1034

Spanish - Argentina es-ar 0x2C0A 11274

Spanish - Bolivia es-bo 0x400A 16394

Spanish - Chile es-cl 0x340A 13322

Spanish - Columbia es-co 0x240A 9226

Spanish - Costa Rica es-cr 0x140A 5130

Spanish - Dominican
es-do 0x1C0A 7178
Republic

Spanish - Ecuador es-ec 0x300A 12298

Spanish - Guatemala es-gt 0x100A 4106

Spanish - Honduras es-hn 0x480A 18442

Spanish - Mexico es-mx 0x080A 2058

Spanish - Nicaragua es-ni 0x4C0A 19466

Spanish - Panama es-pa 0x180A 6154

Spanish - Peru es-pe 0x280A 10250

Spanish - Puerto
es-pr 0x500A 20490
Rico

Spanish - Paraguay es-py 0x3C0A 15370

Spanish - El Salvador es-sv 0x440A 17418

Spanish - Uruguay es-uy 0x380A 14346

Spanish - Venezuela es-ve 0x200A 8202

Sutu sx 0x0430 1072

Swedish sv 0x041D 1053

Swedish - Finland sv-fi 0x081D 2077

Thai th 0x041E 1054

http://www.devguru.com/Technologies/vbscript/quickref/LCIDchart.html (5 of 6) [29/07/2002 12:29:08]


DevGuru Locale ID Reference Chart

Turkish tr 0x041F 1055

Tsonga ts 0x0431 1073

Ukranian uk 0x0422 1058

Urdu - Pakistan ur 0x0420 1056

Vietnamese vi 0x042A 1066

Xhosa xh 0x0434 1076

Yiddish ji 0x043D 1085

Zulu zu 0x0435 1077

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/LCIDchart.html (6 of 6) [29/07/2002 12:29:08]


DevGuru VBScript Function: GetObject

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: GetObject( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML GetObject(PathName, Class)
WMLScript
WSH The GetObject function is used to access an automation object in a file and to assign
XHTML that object to a object variable.
XML DOM
XSLT There are two optional arguments.
Features
Ask DevGuru (PathName, Class)
ASP Resources
HTML Color Chart The optional PathName argument is the full path to and the name of object file to be
Find the Bug accessed.
Knowledge Base
Links If the PathName argument is not used, you must use the Class Argument.
Tips of the Week
T-SQL Syntax Charts The optional Class argument is the name of the application providing the object or the
Tutorials class of the object to create.
Products
dgCalendar Code:
dgCharge <% thepath = "C:\subdirectory\myobject.txt" %>
dgChart <% Set myobject = GetObject(thepath) %>
dgEncrypt <% Set myobject = GetObject(thepath, "MyApplication.SomeObject") %>
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/getobject.html (1 of 2) [29/07/2002 12:29:10]


DevGuru VBScript Function: GetObject

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/getobject.html (2 of 2) [29/07/2002 12:29:10]


DevGuru VBScript Function: GetRef

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: GetRef( )
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML GetRef(FunctionOrSubName)
WMLScript
WSH The GetRef function binds a function or subroutine to an event on a DHTML (Dynamic
XHTML HTML) page.
XML DOM
XSLT The required ObjectName is the name of a DHTML object to which the DHTML event is
Features associated.
Ask DevGuru
ASP Resources The required EventName is the name of a DHTML event to which the function or
HTML Color Chart subroutine will be bound.
Find the Bug
Knowledge Base The mandatory FunctionOrSubName argument is the name of a VBScript function or
Links subroutine to which the DHTML event is to be associated.
Tips of the Week
T-SQL Syntax Charts The above must be used with the Set keyword in the following manner:
Tutorials
Products Code:
dgCalendar Set ObjectName.EventName = GetRef(FunctionOrSubName)
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/GetRef.html (1 of 2) [29/07/2002 12:29:12]


DevGuru VBScript Function: GetRef

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/GetRef.html (2 of 2) [29/07/2002 12:29:12]


DevGuru VBScript Function: Hex

Quick References
ADO Oct Function
ASP
CSS2
HTML FUNCTION: Hex( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Hex(Number)
WMLScript
WSH The Hex function returns the hexadecimal value of an integer number.
XHTML
XML DOM Code:
XSLT <% =Hex(123) %>
Features
Ask DevGuru Output:
ASP Resources 7B
HTML Color Chart
Find the Bug You can also use a negative integer number.
Knowledge Base
Links Code:
Tips of the Week <% =Hex(-123) %>
T-SQL Syntax Charts
Tutorials Output:
Products FF85
dgCalendar
dgCharge For a number with a decimal point (floating-point), the digits to the right of the
dgChart decimal point are ignored.
dgEncrypt
dgFileUpload Code:
dgReport <% =Hex(123.456) %>
dgSort
dgTree Output:
Site 7B
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/hex.html (1 of 2) [29/07/2002 12:29:14]


DevGuru VBScript Function: Hex

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/hex.html (2 of 2) [29/07/2002 12:29:14]


DevGuru VBScript Function: Hour

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Hour( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Hour(Time)
WMLScript
WSH The Hour function returns the hour by using the Time function as an
XHTML argument.
XML DOM
XSLT The output is base upon a 24 clock (military time, values will run
Features from 0 to 23).
Ask DevGuru
ASP Resources Code:
HTML Color Chart <% =Hour(Time) %>
Find the Bug
Knowledge Base Output:
Links 14
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/hour.html (1 of 2) [29/07/2002 12:29:16]


DevGuru VBScript Function: Hour

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/hour.html (2 of 2) [29/07/2002 12:29:16]


DevGuru VBScript Function: InputBox

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: InputBox( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML InputBox(Prompt, Title, Default, Xpos, Ypos, HelpFile, Context)
WMLScript
WSH The InputBox function creates a prompt for an input dialog box.
XHTML
XML DOM The dialog box usually asks a question and prompts a reply from the user.
XSLT
Features If the user clicks the OK button or presses ENTER, the InputBox function returns all text inside
Ask DevGuru the text box. If the user clicks the CANCEL button, a zero-length string "" is returned.
ASP Resources
HTML Color Chart There is one mandatory argument.
Find the Bug
Knowledge Base Prompt
Links
Tips of the Week The Prompt argument is the message string (question) that appears in the dialog box.
T-SQL Syntax Charts
Tutorials Code:
Products <% INPUT TYPE="BUTTON" NAME="button0" VALUE="Click Here!" %>
dgCalendar
dgCharge < SCRIPT LANGUAGE="VBScript" >
dgChart Sub button0_onclick
dgEncrypt Dim returntext
dgFileUpload returntext = InputBox("This is an input box!")
dgReport End Sub
dgSort < /SCRIPT >
dgTree
Site Output:
Authoring Click Here!
Coming Soon
DevGuru Resume
Errata There are six optional arguments.
Link to Us
Merchandise Title
Sponsorships
Testimonials The optional Title argument is the title that appears at the top of the dialog box window.

http://www.devguru.com/Technologies/vbscript/quickref/inputbox.html (1 of 3) [29/07/2002 12:29:19]


DevGuru VBScript Function: InputBox

What's New
Partners Code:
Code Project <% INPUT TYPE="BUTTON" NAME="button1" VALUE="Click Here!" %>
DevelopersDex
Prog. Heaven < SCRIPT LANGUAGE="VBScript" >
Tek-Tips Forum Sub button1_onclick
TopXML Dim returntext promptext
VBXML.COM prompttext = "This is an input box!"
VisualBuilder.com prompttext = prompttext &(chr(13) & chr(10))
W3Schools prompttext = prompttext & "We added a second line!"
XMLPitstop returntext = InputBox(prompttext, "INPUT Function")
ZVON.org End Sub
Search Us! < /SCRIPT >

Output:
Click Here!

Default

The optional Default argument is the text that will appear in the reply window in the dialog box.

Code:
<% INPUT TYPE="BUTTON" NAME="button2" VALUE="Click Here!" %>

< SCRIPT LANGUAGE="VBScript" >


Sub button2_onclick
Dim returntext promptext titletext
prompttext = "This is an input box!"
titletext = "INPUT function"
returntext = InputBox(prompttext, titletext, "Any text you wish...")
End Sub
< /SCRIPT >

Output:
Click Here!

Xpos

The optional Xpos argument determines the horizontal position of the dialog box in the viewing
screen. It is the number of twips from the left side of the screen to the left edge of the dialog
box. Twips are a graphical value used to set the ScaleMode property of an object.

Ypos

The optional Ypos argument determines the vertical position of the dialog box in the viewing
screen. It is the number of twips from the top of the screen to the top edge of the dialog box.
Twips are a graphical value used to set the ScaleMode property of an object.

Code:
<% INPUT TYPE="BUTTON" NAME="button3" VALUE="Click Here!" %>

< SCRIPT LANGUAGE="VBScript" >

http://www.devguru.com/Technologies/vbscript/quickref/inputbox.html (2 of 3) [29/07/2002 12:29:19]


DevGuru VBScript Function: InputBox

Sub button3_onclick
Dim returntext promptext titletext
prompttext = "This is an input box!"
titletext = "INPUT function"
defaulttext = "Upper left corner"
returntext = InputBox(prompttext, titletext, defaulttext, 150, 150)
End Sub
< /SCRIPT >

Output:
Click Here!

HelpFile
Context

The optional HelpFile argument specifies the location of the help file.

The optional Context argument specifies the help context number in the help file.

Not demonstrated.

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/inputbox.html (3 of 3) [29/07/2002 12:29:19]


DevGuru VBScript Function: InStr

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: InStr( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML InStr(Start, String, Substring, Compare)
WMLScript
WSH The InStr function returns the numeric position of the first occurrence of a specified substring
XHTML within a specified string when starting from the beginning (left end) of the string. You can have
XML DOM the search for the substring be sensitive to the case (upper versus lower), or not. The default is
XSLT to be case sensitive (binary comparison).
Features
Ask DevGuru An output of zero indicates no match.
ASP Resources
HTML Color Chart The first argument is optional.
Find the Bug
Knowledge Base Start
Links
Tips of the Week The optional Start argument is the numeric position, counted from the left, which defines where
T-SQL Syntax Charts to start the search for the substring. The search proceeds from the left to the right.
Tutorials
Products There are two mandatory arguments.
dgCalendar
dgCharge String
dgChart
dgEncrypt The String argument is the string in which you will search.
dgFileUpload
dgReport Substring
dgSort
dgTree The Substring argument is the substring you are searching for.
Site
Authoring Code:
Coming Soon <% =InStr("ABCDE ABCDE", "C") %>
DevGuru Resume
Errata Output:
Link to Us 3
Merchandise
Sponsorships Code:
Testimonials <% =InStr(4, "ABCDE ABCDE", "C") %>

http://www.devguru.com/Technologies/vbscript/quickref/instr.html (1 of 2) [29/07/2002 12:29:21]


DevGuru VBScript Function: InStr

What's New
Partners Output:
Code Project 9
DevelopersDex
Prog. Heaven The fourth argument is optional.
Tek-Tips Forum
TopXML Compare
VBXML.COM
VisualBuilder.com The optional Compare argument can be used to set whether the search for the substring will
W3Schools be case sensitive, or not. You must only use either the constant or value of the COMPARISON
XMLPitstop CONSTANTS.
ZVON.org
Search Us! Note that when you use the Compare argument you must use the Start argument.

CONSTANT VALUE DESCRIPTION

Binary comparison
VBBINARYCOMPARE 0
(case sensitive)

Text Comparison
VBTEXTCOMPARE 1
(case insensitive)

VBDATABASECOMPARE 2 Compare information inside database

In the example, by using VBBinaryCompare, or 0, for the Compare argument, all upper/lower
case differences are obeyed in the search for the first match.

Code:
<% =InStr(1, "ABCDE ABCDE", "c", 0) %>

Output:
0

In the example, by using VBTextCompare, or 1, for the Compare argument, all upper/lower
case differences are ignored in the search for the first match.

Code:
<% =InStr(1, "ABCDE ABCDE", "c", VBTextCompare) %>

Output:
3

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/instr.html (2 of 2) [29/07/2002 12:29:21]


DevGuru VBScript Function: InStrRev

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: InStrRev( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML InStrRev(String, Substring, Start, Compare)
WMLScript
WSH The InStrRev function returns the numeric position of the first occurrence of a specified
XHTML substring within a specified string when starting from the end (right end) of the string. You can
XML DOM have the search for the substring be sensitive to the case (upper versus lower), or not. The
XSLT default is to be case sensitive (binary comparison).
Features
Ask DevGuru An output of zero indicates no match.
ASP Resources
HTML Color Chart There are two mandatory arguments.
Find the Bug
Knowledge Base String
Links
Tips of the Week The String argument is the string in which you will search.
T-SQL Syntax Charts
Tutorials Substring
Products
dgCalendar The Substring argument is the substring you are searching for.
dgCharge
dgChart Code:
dgEncrypt <% =InStrRev("ABCDE ABCDE", "C") %>
dgFileUpload
dgReport Output:
dgSort 9
dgTree
Site There are two optional arguments.
Authoring
Coming Soon Start
DevGuru Resume
Errata The optional Start argument is the numeric position, counted from the left, which defines where
Link to Us to start the search for the substring.
Merchandise
Sponsorships In the example the search begins at postion 4, counted from the left, and the search goes from
Testimonials the right to left.

http://www.devguru.com/Technologies/vbscript/quickref/instrrev.html (1 of 2) [29/07/2002 12:29:24]


DevGuru VBScript Function: InStrRev

What's New
Partners Code:
Code Project <% =InStrRev("ABCDE ABCDE", "C", 4) %>
DevelopersDex
Prog. Heaven Output:
Tek-Tips Forum 3
TopXML
VBXML.COM Compare
VisualBuilder.com
W3Schools The optional Compare argument can be used to set whether the search for the substring is
XMLPitstop case sensitive (upper versus lower), or not. You must only use either the constant or value of
ZVON.org the COMPARISON CONSTANTS.
Search Us!

CONSTANT VALUE DESCRIPTION

Binary comparison
VBBINARYCOMPARE 0
(case sensitive)

Text Comparison
VBTEXTCOMPARE 1
(case insensitive)

VBDATABASECOMPARE 2 Compare information inside database

In the example, by using VBBinaryCompare, or 0, for the Compare argument, all upper/lower
case differences are obeyed in both the search.

Code:
<% =InStrRev("ABCDE ABCDE", "c", 4, 0) %>

Output:
0

In the example, by using VBTextCompare, or 1, for the Compare argument, all upper/lower
case differences are ignored in the search.

Code:
<% =InStrRev("ABCDE ABCDE", "c", 4, VBTextCompare %>

Output:
3

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/instrrev.html (2 of 2) [29/07/2002 12:29:24]


DevGuru VBScript Function: Int

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Int( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Int(Number)
WMLScript
WSH The Int function converts a decimal number (floating-point) to an integer number
XHTML (fix-point).
XML DOM
XSLT There is one major difference between Int and Fix. Int rounds negative numbers
Features down. Fix rounds negative numbers up.
Ask DevGuru
ASP Resources Code:
HTML Color Chart <% =Int(123.456) %>
Find the Bug
Knowledge Base Output:
Links 123
Tips of the Week
T-SQL Syntax Charts Positive numbers are not rounded up. The decimal point and all digits to the right
Tutorials are effectively chopped off.
Products
dgCalendar Code:
dgCharge <% =Int(123.899) %>
dgChart
dgEncrypt Output:
dgFileUpload 123
dgReport
dgSort Negative numbers are rounded down (towards more negative).
dgTree
Site Code:
Authoring
<% =Int(-123.456) %>
Coming Soon
DevGuru Resume Output:
Errata -124
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/int.html (1 of 2) [29/07/2002 12:29:26]


DevGuru VBScript Function: Int

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/int.html (2 of 2) [29/07/2002 12:29:26]


DevGuru VBScript Function: IsArray

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: IsArray( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML IsArray(Expression)
WMLScript
WSH The IsArray function determines if the expression is an array.
XHTML
XML DOM Code:
XSLT <% Dim myarray(10) %>
Features <% =IsArray(myarray) %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart True
Find the Bug
Knowledge Base Code:
Links <% =IsArray("This is a string.") %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials False
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/isarray.html (1 of 2) [29/07/2002 12:29:28]


DevGuru VBScript Function: IsArray

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/isarray.html (2 of 2) [29/07/2002 12:29:28]


DevGuru VBScript Function: IsDate

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: IsDate( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML IsDate(Expression)
WMLScript
WSH The IsDate function determines if the expression is a date.
XHTML
XML DOM Code:
XSLT <% mydate = "6/26/1943" %>
Features <% =IsDate(mydate) %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart True
Find the Bug
Knowledge Base Code:
Links <% =IsDate("This is a string.") %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials False
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/isdate.html (1 of 2) [29/07/2002 12:29:30]


DevGuru VBScript Function: IsDate

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/isdate.html (2 of 2) [29/07/2002 12:29:30]


DevGuru VBScript Function: IsEmpty

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: IsEmpty( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML IsEmpty(variant)
WMLScript
WSH The IsEmpty function returns True when passed a Variant that has been declared but not
XHTML initialized. It returns False in all other cases.
XML DOM
XSLT Code:
Features <% =IsEmpty(notbeen) %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart True
Find the Bug
Knowledge Base Code:
Links <% =IsEmpty("This is a string.") %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials False
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/isempty.html (1 of 2) [29/07/2002 12:29:31]


DevGuru VBScript Function: IsEmpty

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/isempty.html (2 of 2) [29/07/2002 12:29:31]


DevGuru VBScript Function: IsNull

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: IsNull( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML IsNull(Expression)
WMLScript
WSH The IsNull function determines if the expression is Null.
XHTML
XML DOM Code:
XSLT <% nothere = null %>
Features <% =IsNull(nothere) %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart True
Find the Bug
Knowledge Base Code:
Links <% =IsNull("This is a string.") %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials False
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/isnull.html (1 of 2) [29/07/2002 12:29:33]


DevGuru VBScript Function: IsNull

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/isnull.html (2 of 2) [29/07/2002 12:29:33]


DevGuru VBScript Function: IsNumeric

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: IsNumeric( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML IsNumeric(Expression)
WMLScript
WSH The IsNumeric function determines if the expression is a
XHTML number.
XML DOM
XSLT Code:
Features <% =IsNumeric(123.456) %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart True
Find the Bug
Knowledge Base Code:
Links <% =IsNumeric("This is a string.") %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials False
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/isnumeric.html (1 of 2) [29/07/2002 12:29:34]


DevGuru VBScript Function: IsNumeric

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/isnumeric.html (2 of 2) [29/07/2002 12:29:34]


DevGuru VBScript Function: IsObject

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: IsObject( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML IsObject(Expression)
WMLScript
WSH The IsObject function determines if the expression is an automation
XHTML object.
XML DOM
XSLT Code:
Features <% Set anyvariable =
Ask DevGuru Server.CreateObject("Scripting.FileSystemObject") %>
ASP Resources <% =IsObject(anyvariable) %>
HTML Color Chart
Find the Bug Output:
Knowledge Base True
Links
Tips of the Week Code:
T-SQL Syntax Charts <% =IsObject("This is a string, not an object.") %>
Tutorials
Products Output:
dgCalendar False
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/isobject.html (1 of 2) [29/07/2002 12:29:35]


DevGuru VBScript Function: IsObject

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/isobject.html (2 of 2) [29/07/2002 12:29:35]


DevGuru VBScript Function: Join

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Join( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML Join(Array, Delimiter)
WMLScript
WSH The Join function combines substrings (elements) of an array together into one long string with
XHTML each substring separated by the delimiter string.
XML DOM
XSLT There is one mandatory argument.
Features
Ask DevGuru Array
ASP Resources
HTML Color Chart The Array argument is the name of the array to be joined.
Find the Bug
Knowledge Base Code:
Links <% Dim cowarray(10) %>
Tips of the Week <% cowarray(0) = "How" %>
T-SQL Syntax Charts <% cowarray(1) = "now" %>
Tutorials <% cowarray(2) = "brown" %>
Products <% cowarray(3) = "cow?" %>
dgCalendar <% Join(cowarray) %>
dgCharge
dgChart Output:
dgEncrypt How now brown cow?
dgFileUpload
dgReport There is one optional argument.
dgSort
dgTree Delimiter
Site
Authoring
The optional Delimiter argument specifies the characters (including blanks) you wish to place
Coming Soon between each element. If this argument is not specified, the default is to place a blank space
DevGuru Resume between each element. If you wish to have no spaces, use a double quote, "", for the
Errata argument.
Link to Us
Merchandise Code:
Sponsorships <% Dim arraycow(10) %>
Testimonials <% arraycow(0) = "How" %>

http://www.devguru.com/Technologies/vbscript/quickref/join.html (1 of 2) [29/07/2002 12:29:38]


DevGuru VBScript Function: Join

What's New <% arraycow(1) = "now" %>


Partners <% arraycow(2) = "brown" %>
Code Project <% arraycow(3) = "cow?" %>
DevelopersDex
Prog. Heaven <% =Join(arraycow, 1234) %>
Tek-Tips Forum <% =Join(arraycow, "****") %>
TopXML <% =Join(arraycow, "") %>
VBXML.COM
VisualBuilder.com Output:
W3Schools How1234now1234brown1234cow?1234123412341234123412341234
XMLPitstop How****now****brown****cow?****************************
ZVON.org Hownowbrowncow?
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/join.html (2 of 2) [29/07/2002 12:29:38]


DevGuru VBScript Function: LBound

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: LBound( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML LBound(ArrayName, Dimension)
WMLScript
WSH The LBound function returns the lower limit for the elements in an array.
XHTML
XML DOM By default, in the current versions of VBScript, the LBound function always returns a
XSLT zero.
Features
Ask DevGuru There is one mandatory argument.
ASP Resources
HTML Color Chart ArrayName
Find the Bug
Knowledge Base The ArrayName argument is the name of the array. Do not include the parenthesis with
Links the array name.
Tips of the Week
T-SQL Syntax Charts Code:
Tutorials <% Dim catarray(3) %>
Products <% catarray(0) = "Mountain lion" %>
dgCalendar <% catarray(1) = "Bobcat" %>
dgCharge <% catarray(2) = "Jaguar" %>
dgChart <% =LBound(catarray) %>
dgEncrypt
dgFileUpload Output:
dgReport 0
dgSort
dgTree There is one optional argument.
Site
Authoring
Dimension
Coming Soon
DevGuru Resume The optional Dimension argument is used to identify which index you are determining the
Errata lower bounds for in a multi-dimensional array.
Link to Us
Merchandise Code:
Sponsorships <% Dim fisharray(2,3) %>
Testimonials <% fisharray(0,0) = "Neon tetra" %>

http://www.devguru.com/Technologies/vbscript/quickref/lbound.html (1 of 2) [29/07/2002 12:29:39]


DevGuru VBScript Function: LBound

What's New <% fisharray(0,1) = "Angle fish" %>


Partners <% fisharray(0,2) = "Discus" %>
Code Project <% fisharray(1,0) = "Golden dojo" %>
DevelopersDex <% fisharray(1,1) = "Clown loach" %>
Prog. Heaven <% fisharray(1,2) = "Betta" %>
Tek-Tips Forum <% =LBound(fisharray, 2) %>
TopXML
VBXML.COM Output:
VisualBuilder.com 0
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/lbound.html (2 of 2) [29/07/2002 12:29:39]


DevGuru VBScript Function: LCase

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: LCase( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML LCase(String)
WMLScript
WSH The LCase function converts a string to all lower case letters.
XHTML
XML DOM There is also a companion function UCase to convert to upper case
XSLT letters.
Features
Ask DevGuru Code:
ASP Resources <% =LCase("Aardvarks do not make good pets!") %>
HTML Color Chart
Find the Bug Output:
Knowledge Base aardvarks do not make good pets!
Links
Tips of the Week You can also use the name of the string.
T-SQL Syntax Charts
Tutorials Code:
Products <% astring="Leopards also make bad pets!" %>
dgCalendar <% =LCase(astring) %>
dgCharge
dgChart Output:
dgEncrypt leopards also make bad pets!
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/lcase.html (1 of 2) [29/07/2002 12:29:41]


DevGuru VBScript Function: LCase

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/lcase.html (2 of 2) [29/07/2002 12:29:41]


DevGuru VBScript Function: Left

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Left( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Left(String, Length)
WMLScript
WSH The Left function returns the left portion of the designated string for a designated length.
XHTML
XML DOM There are two mandatory arguments.
XSLT
Features String
Ask DevGuru
ASP Resources The String argument is the name of the string you wish to truncate.
HTML Color Chart
Find the Bug Length
Knowledge Base
Links The Length argument is the number of characters (including blanks) you wish to save
Tips of the Week counting from the left side towards the right side of the string.
T-SQL Syntax Charts
Tutorials Code:
Products <% =Left("abcde fghij klmno pqrst uvwxyz", 13) %>
dgCalendar
dgCharge Output:
dgChart abcde fghij k
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/left.html (1 of 2) [29/07/2002 12:29:42]


DevGuru VBScript Function: Left

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/left.html (2 of 2) [29/07/2002 12:29:42]


DevGuru VBScript Function: Len

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Len( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Len(String)
WMLScript Len(Varname)
WSH
XHTML The Len function returns the length of the string or the byte size of the
XML DOM variable.
XSLT
Features You can give the function the string or the string name, String or the
Ask DevGuru variable name, Varname.
ASP Resources
HTML Color Chart Code:
Find the Bug <% =Len("Clouded leopards are an endangered species.") %>
Knowledge Base
Links Output:
Tips of the Week 43
T-SQL Syntax Charts
Tutorials Code:
Products <% anystring ="Clouded leopards are an endangered species." %>
dgCalendar <% =Len(anystring) %>
dgCharge
dgChart Output:
dgEncrypt 43
dgFileUpload
dgReport Code:
dgSort <% anyvariable = 123.456 %>
dgTree <% =Len(anyvariable) %>
Site
Authoring
Output:
Coming Soon 7
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/len.html (1 of 2) [29/07/2002 12:29:45]


DevGuru VBScript Function: Len

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/len.html (2 of 2) [29/07/2002 12:29:45]


DevGuru VBScript Function: LoadPicture

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: LoadPicture( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML LoadPicture(PictureName)
WMLScript
WSH The LoadPicture function returns a reference to a picture object (i.e.,
XHTML loads the picture).
XML DOM
XSLT The PictureName argument is the name of the picture file.
Features
Ask DevGuru Code:
ASP Resources <% LoadPicture(mypicture.gif) %>
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/loadpic.html (1 of 2) [29/07/2002 12:29:47]


DevGuru VBScript Function: LoadPicture

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/loadpic.html (2 of 2) [29/07/2002 12:29:47]


DevGuru VBScript Function: Exp Log

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Log( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Log(Number)
WMLScript
WSH The Log function returns the natural logarithm of a number.
XHTML
XML DOM There is a companion function Exp for the reverse operation.
XSLT
Features You can not use a negative number.
Ask DevGuru
ASP Resources Code:
HTML Color Chart <% =Log(26.2850411552082) %>
Find the Bug
Knowledge Base Output:
Links 3.269
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/log.html (1 of 2) [29/07/2002 12:29:48]


DevGuru VBScript Function: Exp Log

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/log.html (2 of 2) [29/07/2002 12:29:48]


DevGuru VBScript Function: LTrim

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: LTrim( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML LTrim(String)
WMLScript
WSH The LTrim function removes extra blank spaces only on the left side
XHTML of a string.
XML DOM
XSLT Note that HTML automatically removes extra blank spaces in this
Features view.
Ask DevGuru
ASP Resources Code:
HTML Color Chart <% =LTrim(" A sentence with extra spaces on both sides. ") %>
Find the Bug
Knowledge Base Output:
Links A sentence with extra spaces on both sides.
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/ltrim.html (1 of 2) [29/07/2002 12:29:49]


DevGuru VBScript Function: LTrim

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/ltrim.html (2 of 2) [29/07/2002 12:29:49]


DevGuru VBScript Function: Mid

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Mid( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Mid(String, Start, Length)
WMLScript
WSH The Mid function returns the portion of the designated string for a designated length starting
XHTML from any position in the string.
XML DOM
XSLT There are two mandatory arguments.
Features
Ask DevGuru String
ASP Resources
HTML Color Chart The String argument is the name of the string you wish to truncate.
Find the Bug
Knowledge Base
Links Start
Tips of the Week
T-SQL Syntax Charts The Start argument is a numeric position anywhere in the string counting from the left side.
Tutorials The portion of the string to the left of this position will be discarded.
Products
dgCalendar Code:
dgCharge <% =Mid("abcde fghij klmno pqrst uvwxyz", 8) %>
dgChart
dgEncrypt Output:
dgFileUpload ghij klmno pqrst uvwxyz
dgReport
dgSort There is one optional argument.
dgTree
Site Length
Authoring
The optional Length argument is the number of characters (including blanks) in the string you
Coming Soon
DevGuru Resume
wish to save counting from the position designated by the Start argument.
Errata
Link to Us Code:
Merchandise <% =Mid("abcde fghij klmno pqrst uvwxyz", 8, 7) %>
Sponsorships
Testimonials Output:
ghij kl

http://www.devguru.com/Technologies/vbscript/quickref/mid.html (1 of 2) [29/07/2002 12:29:52]


DevGuru VBScript Function: Mid

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/mid.html (2 of 2) [29/07/2002 12:29:52]


DevGuru VBScript Function: Minute

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Minute( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Minute(Time)
WMLScript
WSH The Minute function returns the minute by using the Time function as
XHTML an argument.
XML DOM
XSLT Values will run from 0 to 59.
Features
Ask DevGuru Code:
ASP Resources <% =Minute(Time) %>
HTML Color Chart
Find the Bug Output:
Knowledge Base 7
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/minute.html (1 of 2) [29/07/2002 12:29:53]


DevGuru VBScript Function: Minute

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/minute.html (2 of 2) [29/07/2002 12:29:53]


DevGuru VBScript Function: Month

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Month( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Month(Date)
WMLScript
WSH The Month function returns the number of the current month using using any valid
XHTML date expression as an argument.
XML DOM
XSLT You can also use the Date and Now functions as the argument.
Features
Ask DevGuru Code:
ASP Resources <% =Month(Date) %>
HTML Color Chart
Find the Bug Output:
Knowledge Base 3
Links
Tips of the Week Code:
T-SQL Syntax Charts <% =Month("June 26, 1943") %>
Tutorials
Products Output:
dgCalendar 6
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/month.html (1 of 2) [29/07/2002 12:29:55]


DevGuru VBScript Function: Month

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/month.html (2 of 2) [29/07/2002 12:29:55]


DevGuru VBScript Function: Year

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: MonthName( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML MonthName(Month, Abbreviate)
WMLScript
WSH The MonthName function returns the name of the month.
XHTML
XML DOM There is one mandatory argument.
XSLT
Features Month
Ask DevGuru
ASP Resources The Month argument is the number of the month (i.e., 1 throught 12).
HTML Color Chart
Find the Bug Code:
Knowledge Base <% =MonthName(6) %>
Links
Tips of the Week Output:
T-SQL Syntax Charts June
Tutorials
Products There is one optional argument.
dgCalendar
dgCharge Abbreviate
dgChart
dgEncrypt The Abbreviate argument is a Boolean value which gives the option of having the returned
dgFileUpload month name being abbreviated to the first three characters.
dgReport
dgSort If set to True, the name will be abbreviated. If set to False the name will not be abbreviated.
dgTree
Site Code:
Authoring <% =MonthName(6, True) %>
Coming Soon
DevGuru Resume Output:
Errata Jun
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/monthname.html (1 of 2) [29/07/2002 12:29:57]


DevGuru VBScript Function: Year

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/monthname.html (2 of 2) [29/07/2002 12:29:57]


DevGuru VBScript Function: MsgBox

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: MsgBox( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML MsgBox(Prompt, Buttons, Title)
WMLScript
WSH MsgBox(Prompt, Buttons, HelpFile, Context)
XHTML
XML DOM The MsgBox function creates a dialog box with a specified message and prompts the user to
XSLT click a button, upon which the dialog box closes and a value relating to which button was
Features clicked is returned. These values, along with their Constants, are listed in the table below.
Ask DevGuru
ASP Resources
CONSTANT VALUE BUTTON
HTML Color Chart
Find the Bug
VBOK 1 OK
Knowledge Base
Links
VBCancel 2 Cancel
Tips of the Week
T-SQL Syntax Charts
VBAbort 3 Abort
Tutorials
Products VBRetry 4 Retry
dgCalendar
dgCharge VBIgnore 5 Ignore
dgChart
dgEncrypt VBYes 6 Yes
dgFileUpload
dgReport VBNo 7 No
dgSort
dgTree
Site Click on the buttons to see a display of the various available types of Message Box.
Authoring
Coming Soon
DevGuru Resume Click Here! OK
Errata Click Here! OK, Cancel
Link to Us
Merchandise Click Here! Abort, Retry, Ignore
Sponsorships
Click Here! Yes, No, Cancel
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/msgbox.html (1 of 4) [29/07/2002 12:29:59]


DevGuru VBScript Function: MsgBox

What's New
Click Here! Yes, No
Partners
Code Project Click Here! Retry, Cancel
DevelopersDex
Prog. Heaven Click Here!
Tek-Tips Forum
Critical OK
TopXML Click Here! Warning Query OK
VBXML.COM
Click Here! Warning Message OK
VisualBuilder.com
W3Schools Click Here! Info O
XMLPitstop
ZVON.org Click Here! Warning Query, Abort, Retry, Cancel
Search Us!
There is one mandatory argument.

Prompt

The Prompt argument is the message string that appears in the message box.

The default message box is the OK.

Code:
< INPUT TYPE="BUTTON" NAME="button0" VALUE="Click Here!" >

< SCRIPT LANGUAGE="VBScript" >


Sub button0_onclick
MsgBox "Please Click OK"
End Sub
< /SCRIPT >

Output:
Click Here!

There are four optional arguments.

Buttons

The optional Buttons argument must only use the constant or value in the MsgBox
CONSTANTS.

CONSTANT VALUE DESCRIPTION

VBOKOnly 0 Show OK button

VBOKCancel 1 Show OK and cancel buttons

VBAbortRetryIgnore 2 Show abort, retry, ignore buttons

VBYesNoCancel 3 Show yes, no cancel buttons

VBYesNo 4 Show yes, no buttons

VBRetryCancel 5 Show retry, cancel buttons

http://www.devguru.com/Technologies/vbscript/quickref/msgbox.html (2 of 4) [29/07/2002 12:29:59]


DevGuru VBScript Function: MsgBox

VBCritical 16 Show critical message icon

VBQuestion 32 Show warning query button

VBExclamation 48 Show warning message icon

VBInformation 64 Show information message icon

VBDefaultButton1 0 First button is default

VBDefaultButton2 256 Second button is default

VBDefaultButton3 512 Third button is default

VBDefaultButton4 768 Fourth button is default

VBApplicationModal 0 Demands that the user respond to the dialog before


allowing continuation of work in current application

VBSystemModal 4096 Causes suspension of all applications until the user


responds to the dialog

Code:
< INPUT TYPE="BUTTON" NAME="button_1" VALUE="Click Here!"> >

< SCRIPT LANGUAGE="VBScript" >


Sub button_1_onclick
MsgBox "Please Click OK", VBOKCancel
End Sub
< /SCRIPT >

Output:
Click Here!

Note you may use either the Title argument or the HelpFile, Context arguments. You cannot
use both at the same time.

Title

The optional Title argument is the title that appears at the top of the message box window.

Code:
< INPUT TYPE="BUTTON" NAME="button_2" VALUE="Click Here!"> >

< SCRIPT LANGUAGE="VBScript" >


Sub button_2_onclick
MsgBox "Please Click!", VBRetryCanel, "MsgBox Demo"
End Sub
< /SCRIPT >

Output:
Click Here!

http://www.devguru.com/Technologies/vbscript/quickref/msgbox.html (3 of 4) [29/07/2002 12:29:59]


DevGuru VBScript Function: MsgBox

HelpFile

The optional HelpFile argument is a string that specifies the help file that you wish to display.
This must be either a .chm or .hlp file.

Context

The optional Context argument specifies the help context number in the help file of the topic
you wish to display. If you have created your own custom help file, then the Context argument
is mandatory.

Code:
MsgBox "Date is not valid", vbMsgBoxHelpButton, "help_folder/date_help_file.hlp", 71

Output:
Not demonstrated.

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/msgbox.html (4 of 4) [29/07/2002 12:29:59]


DevGuru VBScript Function: Now

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Now
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Now
WMLScript
WSH The Now function returns the date and time as determined by your
XHTML computer.
XML DOM
XSLT Code:
Features <% =Now %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart Monday, July 29, 2002 12:30:00
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/now.html (1 of 2) [29/07/2002 12:30:01]


DevGuru VBScript Function: Now

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/now.html (2 of 2) [29/07/2002 12:30:01]


DevGuru VBScript Function: Oct

Quick References
ADO Hex Function
ASP
CSS2
HTML FUNCTION: Oct( )
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Oct(Number)
WMLScript
WSH The Oct function returns the octal value of an integer number.
XHTML
XML DOM Code:
XSLT <% =Oct(123) %>
Features
Ask DevGuru Output:
ASP Resources 173
HTML Color Chart
Find the Bug You can also use a negative integer number.
Knowledge Base
Links Code:
Tips of the Week <% =Oct(-123) %>
T-SQL Syntax Charts
Tutorials Output:
Products 177605
dgCalendar
dgCharge For a number with a decimal point (floating-point), the digits to the right of the
dgChart decimal point are ignored.
dgEncrypt
dgFileUpload Code:
dgReport <% =Oct(123.456) %>
dgSort
dgTree Output:
Site 173
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/oct.html (1 of 2) [29/07/2002 12:30:02]


DevGuru VBScript Function: Oct

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/oct.html (2 of 2) [29/07/2002 12:30:02]


DevGuru VBScript Function: Replace

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Replace( )
JavaScript
Jet SQL Replace(String, FindSubstring, ReplaceSubstring, Start, Count, Compare)
VBScript
WML The Replace function replaces a specified substring within a specified string with a new
WMLScript specified substring and returns the modified string.
WSH
XHTML There are three mandatory arguments.
XML DOM
XSLT String
Features
Ask DevGuru The String argument is the string to be searched.
ASP Resources
HTML Color Chart FindSubstring
Find the Bug
Knowledge Base The FindSubstring argument is the substring you are searching for inside the string.
Links
Tips of the Week ReplaceSubstring
T-SQL Syntax Charts
Tutorials The ReplaceSubstring argument is the the new substring string that you wish to insert inside
Products the string.
dgCalendar
dgCharge Code:
dgChart <% =Replace("How now brown cow?", "brown", "purple") %>
dgEncrypt
dgFileUpload Output:
dgReport How now purple cow?
dgSort
dgTree There are three optional arguments.
Site
Authoring Start
Coming Soon
DevGuru Resume The optional Start argument specifies the position number, counting from the left, where you
Errata wish to start the search.
Link to Us
Merchandise Note that the portion of the string to the left of the start position will be discarded.
Sponsorships
Testimonials Code:

http://www.devguru.com/Technologies/vbscript/quickref/replace.html (1 of 2) [29/07/2002 12:30:03]


DevGuru VBScript Function: Replace

What's New <% =Replace("How now brown cow?", "brown", "purple", 7) %>
Partners
Code Project Output:
DevelopersDex w purple cow?
Prog. Heaven
Tek-Tips Forum Count
TopXML
VBXML.COM The optional Count argument specifies how many times to replace the substring.
VisualBuilder.com
W3Schools Code:
XMLPitstop <% =Replace("red blue red-blue redblue bluered", "blue", "purple", 1, 3) %>
ZVON.org
Search Us! Output:
red purple red-purple redpurple bluered

Compare

The optional Compare argument must only use either the constant or value of the
COMPARISON CONSTANTS.

CONSTANT VALUE DESCRIPTION

VBBinaryCompare 0 Binary comparison

VBTextCompare 1 Text Comparison

VBDataBaseCompare 2 Compare information inside database

In the example, by using VBBinaryCompare, or 0, for the Compare argument, all upper/lower
case differences are obeyed in both the search and replace.

Code:
<% =Replace("red blue red-blue redblue bluered", "BLUE", "PURPLE", 1, 3, 0) %>

Output:
red blue red-blue redblue bluered

In the example, by using VBTextCompare, or 1, for the Compare argument, all upper/lower
case differences are ignored in the search and obeyed in the replace.

Code:
<% =Replace("red blue red-blue redblue bluered", "BLUE", "PURPLE", 1, 3, 1) %>

Output:
red PURPLE red-PURPLE redPURPLE bluered

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/replace.html (2 of 2) [29/07/2002 12:30:03]


DevGuru VBScript Function: RGB

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: RGB( )
JavaScript
Jet SQL Implemented in version 2.0
VBScript
WML RGB(red, green, blue)
WMLScript
WSH The RGB function returns an integer that defines an RGB color value.
XHTML
XML DOM RGB is an old television term. It refers to the primary colors that are used in color television
XSLT (red, green, and blue). These three colors are blended together inside a television tube to
Features create the colors displayed on the screen. The same concept is applied to computer monitors.
Ask DevGuru
ASP Resources There are three mandatory arguments.
HTML Color Chart
Find the Bug The red mandatory agrument defines the red component of the color and must be an integer
Knowledge Base number ranging from 0 to 255.
Links
Tips of the Week The green mandatory agrument defines the green component of the color and must be an
T-SQL Syntax Charts integer number ranging from 0 to 255.
Tutorials
Products The blue mandatory agrument defines the blue component of the color and must be an integer
dgCalendar number ranging from 0 to 255.
dgCharge
dgChart If the integer argument exceeds 255, it will be treated as 255. Note, that there are 256*256*256
dgEncrypt = 16,777,215 different color permutations.
dgFileUpload
dgReport Code:
dgSort <% = RGB(0, 0, 0) %>
dgTree <% = RGB(94, 71, 177) %>
Site <% = RGB(255, 255, 255) %>
Authoring
Coming Soon Output:
DevGuru Resume 0
Errata 11618142
Link to Us 16777215
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/RGB.html (1 of 2) [29/07/2002 12:30:05]


DevGuru VBScript Function: RGB

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/RGB.html (2 of 2) [29/07/2002 12:30:05]


DevGuru VBScript Function: Right

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Right( )
JavaScript
Jet SQL Right(String, Length)
VBScript
WML The Right function returns the right portion of the designated string for a designated length
WMLScript starting from the right side.
WSH
XHTML There are two mandatory arguments.
XML DOM
XSLT String
Features
Ask DevGuru The String argument is the name of the string you wish to truncate.
ASP Resources
HTML Color Chart Length
Find the Bug
Knowledge Base The Length argument is the number of characters (including blanks) you wish to save
Links counting from the right side towards the left side of the string.
Tips of the Week
T-SQL Syntax Charts Code:
Tutorials <% =Right("abcde fghij klmno pqrst uvwxyz", 13) %>
Products
dgCalendar Output:
dgCharge pqrst uvwxyz
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/right.html (1 of 2) [29/07/2002 12:30:06]


DevGuru VBScript Function: Right

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/right.html (2 of 2) [29/07/2002 12:30:06]


DevGuru VBScript Function: Rnd

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Rnd( )
JavaScript
Jet SQL Rnd(Number)
VBScript
WML The Rnd function generates a pseudo-random number greater than or equal to 0.0 and less
WMLScript than 1.0.
WSH
XHTML The Number argument is optional, but different numbers will give different pseudo-random
XML DOM numbers.
XSLT
Features Note that the number generated is pseudo-random, because the same output tends to be
Ask DevGuru repeated over and over. You can use the Randomize statement to over come this problem.
ASP Resources
HTML Color Chart Code:
Find the Bug <% =Rnd() %>
Knowledge Base
Links Output:
Tips of the Week 0.7055475
T-SQL Syntax Charts
Tutorials Code:
Products <% =Rnd(127.89) %>
dgCalendar
dgCharge Output:
dgChart 0.533424
dgEncrypt
dgFileUpload Code:
dgReport <% =Rnd(-127.89) %>
dgSort
dgTree Output:
Site 0.6953956
Authoring
Coming Soon Code:
DevGuru Resume <% Randomize %>
Errata <% =Rnd() %>
Link to Us
Merchandise Output:
Sponsorships 0.1414095
Testimonials
The following code will generate a random number between any limits you choose. (Since the

http://www.devguru.com/Technologies/vbscript/quickref/rnd.html (1 of 2) [29/07/2002 12:30:07]


DevGuru VBScript Function: Rnd

What's New Int function always rounds down, we add one to the difference between the limits.)
Partners
Code Project Code:
DevelopersDex <% upperlimit = 50000.0 %>
Prog. Heaven <% lowerlimit = -30000.0 %>
Tek-Tips Forum <% =Int((upperlimit - lowerlimit + 1)*Rnd() + lowerlimit) %>
TopXML
VBXML.COM Output:
VisualBuilder.com 30366
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/rnd.html (2 of 2) [29/07/2002 12:30:07]


DevGuru VBScript Function: Round

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Round( )
JavaScript
Jet SQL Round(Number, NumDecimalPlaces)
VBScript
WML The Round function rounds off a floating-point number (decimal) to a specified number of
WMLScript decimal places.
WSH
XHTML There is one mandatory argument.
XML DOM
XSLT Number
Features
Ask DevGuru The Number argument is the number you wish to round off.
ASP Resources
HTML Color Chart If the number of decimal places to round off to is not specified, the number is rounded off to
Find the Bug an integer.
Knowledge Base
Links Code:
Tips of the Week <% =Round(1.123456789) %>
T-SQL Syntax Charts
Tutorials Output:
Products 1
dgCalendar
dgCharge Code:
dgChart <% =Round(9.87654321) %>
dgEncrypt
dgFileUpload Output:
dgReport 10
dgSort
dgTree Note that negative numbers are rounded down (more negative).
Site
Authoring
Code:
Coming Soon <% =Round(-2.899999999) %>
DevGuru Resume
Errata Output:
Link to Us -3
Merchandise
Sponsorships Even numbers that are composed of the exact decimal .5, such as 2.5, 4.50, or 22.500000,
Testimonials are rounded down (towards the negative direction).

http://www.devguru.com/Technologies/vbscript/quickref/round.html (1 of 3) [29/07/2002 12:30:09]


DevGuru VBScript Function: Round

What's New Negative, even numbers are rounded up (towards the postive direction).
Partners
Code Project Odd number that are composed of the exact decimal .5, such as 1.5, 3.50, or 21.500000,
DevelopersDex are rounded up (towards the positive direction).
Prog. Heaven
Tek-Tips Forum Negative, odd numbers are rounded down (towards the negative direction).
TopXML
VBXML.COM Code:
VisualBuilder.com <% =Round(4.50) %>
W3Schools <% =Round(3.5) %>
XMLPitstop <% =Round(2.5000) %>
ZVON.org <% =Round(1.5) %>
Search Us! <% =Round(0.50000) %>
<% =Round(-0.50) %>
<% =Round(-1.5) %>
<% =Round(-2.50000000) %>
<% =Round(-3.5) %>
<% =Round(-4.5) %>

Output:
4
4
2
2
0
0
-2
-2
-4
-4

There is one optional argument.

NumDecimalPlaces

The optional NumDecimalPlaces argument specifies how many decimal places to round
off to.

Code:
<% =Round(1.123456789, 6) %>

Output:
1.123457

Note that negative numbers are rounded down (more negative).

Code:
<% =Round(-2.899999999, 2) %>

Output:
-2.9

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/round.html (2 of 3) [29/07/2002 12:30:09]


DevGuru VBScript Function: Round

http://www.devguru.com/Technologies/vbscript/quickref/round.html (3 of 3) [29/07/2002 12:30:09]


DevGuru VBScript Function: RTrim

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: RTrim( )
JavaScript
Jet SQL RTrim(String)
VBScript
WML The RTrim function removes extra blank spaces only on the right
WMLScript side of a string.
WSH
XHTML Note that HTML automatically removes extra blank spaces in this
XML DOM view.
XSLT
Features Code:
Ask DevGuru <% =RTrim(" A sentence with extra spaces on both sides. ") %>
ASP Resources
HTML Color Chart Output:
Find the Bug A sentence with extra spaces on both sides.
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/rtrim.html (1 of 2) [29/07/2002 12:30:10]


DevGuru VBScript Function: RTrim

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/rtrim.html (2 of 2) [29/07/2002 12:30:10]


DevGuru VBScript Function: ScriptEngine

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: ScriptEngine
JavaScript
Jet SQL ScriptEngine
VBScript
WML The ScriptEngine function returns the name of the scripting language being
WMLScript used.
WSH
XHTML Code:
XML DOM <% =ScriptEngine %>
XSLT
Features Output:
Ask DevGuru VBScript
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/scriptengine.html (1 of 2) [29/07/2002 12:30:12]


DevGuru VBScript Function: ScriptEngine

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/scriptengine.html (2 of 2) [29/07/2002 12:30:12]


DevGuru VBScript Function: ScriptEngineBuildVersion

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: ScriptEngineBuildVersion
JavaScript
Jet SQL ScriptEngineBuildVersion
VBScript
WML The ScriptEngineBuildVersion function returns the name of the script engine
WMLScript being used.
WSH
XHTML Code:
XML DOM <% =ScriptEngineBuildVersion %>
XSLT
Features Output:
Ask DevGuru 2926
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/scriptenginebuildversion.html (1 of 2) [29/07/2002 12:30:13]


DevGuru VBScript Function: ScriptEngineBuildVersion

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/scriptenginebuildversion.html (2 of 2) [29/07/2002 12:30:13]


DevGuru VBScript Function: ScriptEngineMajorVersion

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: ScriptEngineMajorVersion
JavaScript
Jet SQL ScriptEngineMajorVersion
VBScript
WML The ScriptEngineMajorVersion function returns the major version number of the
WMLScript script engine being used.
WSH
XHTML Code:
XML DOM <% =ScriptEngineMajorVersion %>
XSLT
Features Output:
Ask DevGuru 4
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/scriptenginemajorversion.html (1 of 2) [29/07/2002 12:30:14]


DevGuru VBScript Function: ScriptEngineMajorVersion

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/scriptenginemajorversion.html (2 of 2) [29/07/2002 12:30:14]


DevGuru VBScript Function: ScriptEngineMinorVersion

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: ScriptEngineMinorVersion
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML ScriptEngineMinorVersion
WMLScript
WSH The ScriptEngineMinorVersion function returns the minor version number of the
XHTML script engine being used.
XML DOM
XSLT Code:
Features <% =ScriptEngineMinorVersion %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart 0
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/scriptengineminorversion.html (1 of 2) [29/07/2002 12:30:15]


DevGuru VBScript Function: ScriptEngineMinorVersion

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/scriptengineminorversion.html (2 of 2) [29/07/2002 12:30:15]


DevGuru VBScript Function: Second

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Second( )
JavaScript
Jet SQL Second(Time)
VBScript
WML The Second function returns the second using the Time function as
WMLScript an argument.
WSH
XHTML Values will run from 0 to 59.
XML DOM
XSLT Code:
Features <% =Second(Time) %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart 56
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/second.html (1 of 2) [29/07/2002 12:30:17]


DevGuru VBScript Function: Second

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/second.html (2 of 2) [29/07/2002 12:30:17]


DevGuru VBScript Function: SetLocale

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: SetLocale()
JavaScript
Jet SQL SetLocale(LCID)
VBScript
WML The SetLocale function sets the LCID (locale ID).
WMLScript
WSH There is one mandatory argument, the LCID, which is a short string, decimal value, or hex
XHTML value that uniquely identifies a geographic locale. The various geographic locales are based
XML DOM upon the user's language, country, and culture. For example, the locale "English - United
XSLT States" can be designated as either "en-us", or "1033", or "0x0409".
Features
Ask DevGuru This locale information is used to establish user preferences and formats for such things as
ASP Resources alphabets, currency, dates, keyboard layout, and numbers. A list of these locales, and their
HTML Color Chart return values, can be found here.
Find the Bug
Knowledge Base If the LCID is set to zero, the locale will be set by the system.
Links
Tips of the Week Code:
T-SQL Syntax Charts
<% =SetLocale(0) %>
Tutorials
Products Output:
dgCalendar 1033
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/SetLocale.html (1 of 2) [29/07/2002 12:30:18]


DevGuru VBScript Function: SetLocale

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/SetLocale.html (2 of 2) [29/07/2002 12:30:18]


DevGuru VBScript Function: Sgn

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Sgn()
JavaScript
Jet SQL Sgn(Number)
VBScript
WML The Sgn function returns the sign of a number.
WMLScript
WSH -1 indicates a negative number.
XHTML 0 indicates the number zero.
XML DOM 1 indicates a positive number.
XSLT
Features Code:
Ask DevGuru <% =Sgn(-127.89) %>
ASP Resources
HTML Color Chart Output:
Find the Bug -1
Knowledge Base
Links Code:
Tips of the Week <% =Sgn(0) %>
T-SQL Syntax Charts
Tutorials Output:
Products 0
dgCalendar
dgCharge Code:
dgChart <% =Sgn(127.89) %>
dgEncrypt
dgFileUpload Output:
dgReport 1
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/sgn.html (1 of 2) [29/07/2002 12:30:19]


DevGuru VBScript Function: Sgn

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/sgn.html (2 of 2) [29/07/2002 12:30:19]


DevGuru VBScript Function: Sins

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Sin( )
JavaScript
Jet SQL Sin(Number)
VBScript
WML The Sin function returns the sine for a number (angle).
WMLScript
WSH Code:
XHTML <% =Sin(45.0) %>
XML DOM
XSLT Output:
Features 0.850903524534118
Ask DevGuru
ASP Resources You can also use a negative number (angle).
HTML Color Chart
Find the Bug Code:
Knowledge Base <% =Sin(-45.0) %>
Links
Tips of the Week Output:
T-SQL Syntax Charts -0.850903524534118
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/Sin.html (1 of 2) [29/07/2002 12:30:21]


DevGuru VBScript Function: Sins

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/Sin.html (2 of 2) [29/07/2002 12:30:21]


DevGuru VBScript Function: Spaces

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Space( )
JavaScript
Jet SQL Space(Number)
VBScript
WML The Space function creates a string with the specified number of
WMLScript blank spaces.
WSH
XHTML Note that HTML will only show one blank space on the same line.
XML DOM
XSLT Code:
Features <% ="Line above space." %>
Ask DevGuru <% =Space(13) %>
ASP Resources <% ="Line below space." %>
HTML Color Chart
Find the Bug Output:
Knowledge Base Line above space.
Links
Tips of the Week Line below space.
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/space.html (1 of 2) [29/07/2002 12:30:22]


DevGuru VBScript Function: Spaces

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/space.html (2 of 2) [29/07/2002 12:30:22]


DevGuru VBScript Function: Split

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Split( )
JavaScript
Jet SQL Split(Expression, Delimiter, Count, Compare)
VBScript
WML The Split function separates a string into substrings and creates a one-dimensional array
WMLScript where each substring is an element.
WSH
XHTML There is one mandatory argument.
XML DOM
XSLT Expression
Features
Ask DevGuru The Expression argument is a string expression.
ASP Resources
HTML Color Chart Code:
Find the Bug <% mystring = "How now brown cow?" %>
Knowledge Base <% myarray = Split(mystring) %>
Links <% =myarray(0) %>
Tips of the Week <% =myarray(1) %>
T-SQL Syntax Charts <% =myarray(2) %>
Tutorials <% =myarray(3) %>
Products
dgCalendar Output:
dgCharge How
dgChart now
dgEncrypt brown
dgFileUpload cow?
dgReport
dgSort There are three optional arguments.
dgTree
Site Delimiter
Authoring
Coming Soon The optional Delimiter argument specifies the characters (including blanks) you wish to use to
DevGuru Resume separate the expression. The default is a single empty space, " ".
Errata
Link to Us Code:
Merchandise <% mystring = "How now brown cow?" %>
Sponsorships <% myarray = Split(mystring, "ow") %>
Testimonials <% =myarray(0) %>

http://www.devguru.com/Technologies/vbscript/quickref/split.html (1 of 3) [29/07/2002 12:30:24]


DevGuru VBScript Function: Split

What's New <% =myarray(1) %>


Partners <% =myarray(2) %>
Code Project <% =myarray(3) %>
DevelopersDex <% =myarray(4) %>
Prog. Heaven
Tek-Tips Forum Output:
TopXML H
VBXML.COM n
VisualBuilder.com br
W3Schools nc
XMLPitstop ?
ZVON.org
Search Us! Count

The optional Count argument specifies the number of elements to return.

Code:
<% mystring = "How now brown cow?" %>
<% myarray = Split(mystring, " ", 2) %>
<% =myarray(0) %>
<% =myarray(1) %>

Output:
How
now brown cow?

Compare

The optional Compare argument must only use the constant or value of the COMPARISON
CONSTANTS.

CONSTANT VALUE DESCRIPTION

VBBinaryCompare 0 Binary comparison

VBTextCompare 1 Text Comparison

VBDataBaseCompare 2 Compare information inside database

In the example, by using VBTextCompare for the Compare argument, the split occurs at the b
and ignores the upper case difference between the Delimiter argument "B".

Code:
<% mystring = "How now brown cow?" %>
<% myarray = Split(mystring, "B", 2, 1) %>
<% =myarray(0) %>
<% =myarray(1) %>

Output:
How now
rown cow?

Code:

http://www.devguru.com/Technologies/vbscript/quickref/split.html (2 of 3) [29/07/2002 12:30:24]


DevGuru VBScript Function: Split

<% mystring = "How now brown cow?" %>


<% myarray = Split(mystring, "B", 2, VBTextCompare) %>
<% =myarray(0) %>
<% =myarray(1) %>

Output:
How now
rown cow?

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/split.html (3 of 3) [29/07/2002 12:30:24]


DevGuru VBScript Function: Sqr

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Sqr( )
JavaScript
Jet SQL Sqr(Number)
VBScript
WML The Sqr function returns the square root of a positive number.
WMLScript
WSH Code:
XHTML <% =Sqr(4) %>
XML DOM
XSLT Output:
Features 2
Ask DevGuru
ASP Resources Code:
HTML Color Chart <% =Sqr(123.456789) %>
Find the Bug
Knowledge Base Output:
Links 11.1111110605556
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/sqr.html (1 of 2) [29/07/2002 12:30:26]


DevGuru VBScript Function: Sqr

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/sqr.html (2 of 2) [29/07/2002 12:30:26]


DevGuru VBScript Function: StrComp

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: StrComp( )
JavaScript
Jet SQL StrComp(String1, String2, Compare)
VBScript
WML The StrComp function compares two strings to see if they are the same. You can have the
WMLScript comparison be sensitive, or not, to the case (upper versus lower) of the characters in the two
WSH strings. The default is to be case sensitive (binary comparison).
XHTML
XML DOM If the strings are the same, the output is zero. If the strings are different, the output will be a 1
XSLT or -1 depending on the order of the strings.
Features
Ask DevGuru There are two mandatory arguments.
ASP Resources
HTML Color Chart String1
Find the Bug
Knowledge Base The String1 argument is the first of two strings to compare.
Links
Tips of the Week String2
T-SQL Syntax Charts
Tutorials The String2 argument is the second of two strings to compare.
Products
dgCalendar Code:
dgCharge <% =StrComp("Mountains of the Moon", "Mountains of the Moon") %>
dgChart
dgEncrypt Output:
dgFileUpload 0
dgReport
dgSort Code:
dgTree <% =StrComp("Mountains of the Moon", "Red sails at sunset") %>
Site
Authoring Output:
Coming Soon -1
DevGuru Resume
Errata There is one optional argument.
Link to Us
Merchandise Compare
Sponsorships
Testimonials The optional Compare argument can be used to set whether the comparison is case sensitive

http://www.devguru.com/Technologies/vbscript/quickref/strcomp.html (1 of 2) [29/07/2002 12:30:28]


DevGuru VBScript Function: StrComp

What's New (upper versus lower), or not. You must only use the constant or the value of the COMPARISON
Partners CONSTANTS.
Code Project
DevelopersDex
CONSTANT VALUE DESCRIPTION
Prog. Heaven
Tek-Tips Forum
TopXML
Binary comparison
VBBinaryCompare 0
VBXML.COM
(case sensitive)
VisualBuilder.com
W3Schools Text Comparison
VBTextCompare 1
XMLPitstop (case insensitive)
ZVON.org
Search Us!
Code:
<% =StrComp("Mountains of the Moon", "mountains of the moon", 0) %>

Output:
-1

Code:
<% =StrComp("Mountains of the Moon", "mountains of the moon", 1) %>

Output:
0

Code:
<% =StrComp("RED", "red", VBTextCompare) %>

Output:
0

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/strcomp.html (2 of 2) [29/07/2002 12:30:28]


DevGuru VBScript Function: String

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: String( )
JavaScript
Jet SQL String(Number, Character)
VBScript
WML The String function creates a string with a single character repeated the
WMLScript specified number of times.
WSH
XHTML Both arguments are mandatory.
XML DOM
XSLT Number
Features The Number argument must an integer and defines the number of times to
Ask DevGuru
repeat the character.
ASP Resources
HTML Color Chart Character
Find the Bug
Knowledge Base The Character argument is a single character.
Links
Tips of the Week It must be inside a pair of double quotes.
T-SQL Syntax Charts
Tutorials Code:
Products <% =String(33, "!") %>
dgCalendar
Output:
dgCharge
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/string.html (1 of 2) [29/07/2002 12:30:29]


DevGuru VBScript Function: String

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/string.html (2 of 2) [29/07/2002 12:30:29]


DevGuru VBScript Function: StrReverse

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: StrReverse( )
JavaScript
Jet SQL StrReverse(String)
VBScript
WML The StrReverse function reverses the characters (including blanks)
WMLScript in a string.
WSH
XHTML Code:
XML DOM <% =StrReverse("abcde fghij klmno pqrst uvwxyz") %>
XSLT
Features Output:
Ask DevGuru zyxwvu tsrqp onmlk jihgf edcba
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/strreverse.html (1 of 2) [29/07/2002 12:30:31]


DevGuru VBScript Function: StrReverse

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/strreverse.html (2 of 2) [29/07/2002 12:30:31]


DevGuru VBScript Function: Tan

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Tan( )
JavaScript
Jet SQL Tan(Number)
VBScript
WML The Tan function returns the tangent for a number (angle).
WMLScript
WSH Code:
XHTML <% =Tan(45.0) %>
XML DOM
XSLT Output:
Features 1.61977519054386
Ask DevGuru
ASP Resources You can also use a negative number (angle).
HTML Color Chart
Find the Bug Code:
Knowledge Base <% =Tan(-45.0) %>
Links
Tips of the Week Output:
T-SQL Syntax Charts -1.61977519054386
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/tan.html (1 of 2) [29/07/2002 12:30:32]


DevGuru VBScript Function: Tan

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/tan.html (2 of 2) [29/07/2002 12:30:32]


DevGuru VBScript Function: Time

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Time
JavaScript
Jet SQL Time
VBScript
WML The Time function returns the current time as defined by your
WMLScript computer.
WSH
XHTML Code:
XML DOM <% =Time %>
XSLT
Features Output:
Ask DevGuru 2:07:56 PM
ASP Resources
HTML Color Chart
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/time.html (1 of 2) [29/07/2002 12:30:34]


DevGuru VBScript Function: Time

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/time.html (2 of 2) [29/07/2002 12:30:34]


DevGuru VBScript Function: Timer

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Timer
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML Timer
WMLScript
WSH The Timer function returns the number of seconds that have passed since midnight (12:00:00
XHTML AM).
XML DOM
XSLT Timer keeps track of the seconds to at least seven decimal places of accuracy. So, you can
Features use Timer as a "stop watch" to find the start and finish times of an operation. Then simply
Ask DevGuru display the difference to find the elapsed time. However, for very short elapsed time periods,
ASP Resources the difference may displayed as zero.
HTML Color Chart
Find the Bug Code:
Knowledge Base <% =Now %>
Links <% =Timer %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials
Products 10/27/99 2:14:36 PM
dgCalendar
51276.99
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/timer.html (1 of 2) [29/07/2002 12:30:35]


DevGuru VBScript Function: Timer

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/timer.html (2 of 2) [29/07/2002 12:30:35]


DevGuru VBScript Function: TimeSerial

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: TimeSerial( )
JavaScript
Jet SQL TimeSerial(Hour, Minute, Second)
VBScript
WML The TimeSerial function converts the arguments into the variant of
WMLScript subtype Date.
WSH
XHTML There are three mandatory arguments.
XML DOM
XSLT Hour
Features
Ask DevGuru The Hour argument is the hour as a string or integer.
ASP Resources
HTML Color Chart Minute
Find the Bug
Knowledge Base The Minute argument is the minute as a string or integer.
Links
Tips of the Week Second
T-SQL Syntax Charts
Tutorials The Second argument is the second as a string or integer.
Products
dgCalendar Code:
dgCharge <% =TimeSerial(12, 11, 10) %>
dgChart
dgEncrypt Output:
dgFileUpload 12:11:10 PM
dgReport
dgSort Code:
dgTree <% =TimeSerial("12", "11", "10") %>
Site
Authoring Output:
Coming Soon 12:11:10 PM
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/timeserial.html (1 of 2) [29/07/2002 12:30:37]


DevGuru VBScript Function: TimeSerial

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/timeserial.html (2 of 2) [29/07/2002 12:30:37]


DevGuru VBScript Function: TimeValue

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: TimeValue( )
JavaScript
Jet SQL TimeValue(String)
VBScript
WML The TimeValue function converts an argument into the variant of subtype
WMLScript Date.
WSH
XHTML The String argument must be a string in valid date format or you will get an
XML DOM error message.
XSLT
Features Code:
Ask DevGuru <% mystring = "2:23:17 PM" %>
ASP Resources <% =TimeValue(mystring) %>
HTML Color Chart
Find the Bug Output:
Knowledge Base 2:23:17 PM
Links
Tips of the Week Code:
T-SQL Syntax Charts <% =TimeValue("14:23") %>
Tutorials
Products Output:
dgCalendar 2:23:00 PM
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/timevalue.html (1 of 2) [29/07/2002 12:30:39]


DevGuru VBScript Function: TimeValue

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/timevalue.html (2 of 2) [29/07/2002 12:30:39]


DevGuru VBScript Function: Trim

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Trim( )
JavaScript
Jet SQL Trim(String)
VBScript
WML The Trim function removes extra blank spaces on both the right and left
WMLScript side of a string.
WSH
XHTML Note that HTML automatically removes extra blank spaces in this view.
XML DOM
XSLT In this example, note that the extra white spaces are removed from both
Features sides.
Ask DevGuru Code:
ASP Resources <% =Trim(" How now brown cow? ") %>
HTML Color Chart
Find the Bug Output:
Knowledge Base How now brown cow?
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/trim.html (1 of 2) [29/07/2002 12:30:40]


DevGuru VBScript Function: Trim

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/trim.html (2 of 2) [29/07/2002 12:30:40]


DevGuru VBScript Function: UBound

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: UBound( )
JavaScript
Jet SQL UBound(ArrayName, Dimension)
VBScript
WML The UBound function returns the upper limit for the number of elements in an array (the
WMLScript elements can be empty).
WSH
XHTML There is one mandatory argument.
XML DOM
XSLT ArrayName
Features
Ask DevGuru The ArrayName argument is the name of the array. Do not include the parenthesis with
ASP Resources the array name.
HTML Color Chart
Find the Bug Code:
Knowledge Base <% Dim katarray(5) %>
Links <% katarray(0) = "Mountain lion" %>
Tips of the Week <% katarray(1) = "Bobcat" %>
T-SQL Syntax Charts <% katarray(2) = "Jaguar" %>
Tutorials <% =UBound(katarray) %>
Products
dgCalendar
Output:
dgCharge 5
dgChart
dgEncrypt There is one optional argument.
dgFileUpload
dgReport Dimension
dgSort
dgTree The optional Dimension argument is used to identify which index you are determining
Site the upper bounds for in a multi-dimensional array.
Authoring
Code:
Coming Soon
<% Dim arrayfish(4,6) %>
DevGuru Resume
Errata
<% arrayfish(0,0) = "Neon tetra" %>
Link to Us
<% arrayfish(0,1) = "Angle fish" %>
Merchandise
<% arrayfish(0,2) = "Discus" %>
Sponsorships <% arrayfish(1,0) = "Golden dojo" %>
Testimonials <% arrayfish(1,1) = "Clown loach" %>
<% arrayfish(1,2) = "Betta" %>

http://www.devguru.com/Technologies/vbscript/quickref/ubound.html (1 of 2) [29/07/2002 12:30:42]


DevGuru VBScript Function: UBound

What's New <% =UBound(arrayfish, 2) %>


Partners
Code Project Output:
DevelopersDex 6
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/ubound.html (2 of 2) [29/07/2002 12:30:42]


DevGuru VBScript Function: UCase

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: UCase( )
JavaScript
Jet SQL UCase(String)
VBScript
WML The UCase function converts a string to all upper case letters.
WMLScript
WSH There is also a companion function LCase to convert to lower case
XHTML letters.
XML DOM
XSLT Code:
Features <% =UCase("Aardvarks do not make good pets!") %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart AARDVARKS DO NOT MAKE GOOD PETS!
Find the Bug
Knowledge Base
Links
Tips of the Week
T-SQL Syntax Charts
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/ucase.html (1 of 2) [29/07/2002 12:30:44]


DevGuru VBScript Function: UCase

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/ucase.html (2 of 2) [29/07/2002 12:30:44]


DevGuru VBScript Function: VarType

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: VarType( )
JavaScript
Jet SQL VarType(Varname)
VBScript
WML The VarType function is used to determine the subtype of a named
WMLScript variable.
WSH
XHTML The output of this function is a value which is a VarType CONSTANT.
XML DOM
XSLT
Features CONSTANT VALUE DESCRIPTION
Ask DevGuru
VBEmpty 0 Uninitialized
ASP Resources
HTML Color Chart
VBNull 1 Contains no valid data
Find the Bug
Knowledge Base
VBInteger 2 Integer subtype
Links
Tips of the Week
T-SQL Syntax Charts
VBLong 3 Long subtype
Tutorials
VBSingle 4 Single subtype
Products
dgCalendar VBDouble 5 Double subtype
dgCharge
dgChart VBCurrency 6 Currency subtype
dgEncrypt
dgFileUpload VBDate 7 Date subtype
dgReport
dgSort VBString 8 String subtype
dgTree
Site VBObject 9 Object
Authoring
Coming Soon VBError 10 Error subtype
DevGuru Resume
Errata VBBoolean 11 Boolean subtype
Link to Us
Merchandise VBVariant 12 Variant (only use for arrays of variants)
Sponsorships
Testimonials VBDataObject 13 Data access object

http://www.devguru.com/Technologies/vbscript/quickref/vartype.html (1 of 2) [29/07/2002 12:30:46]


DevGuru VBScript Function: VarType

What's New
VBDecimal 14 Decimal subtype
Partners
Code Project
VBByte 17 Byte subtype
DevelopersDex
Prog. Heaven
VBArray 8192 Array
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com Code:
W3Schools <% whatsubtype="This is a string subtype" %>
XMLPitstop <% =VarType(whatsubtype) %>
ZVON.org
Search Us! Output:
8

Code:
<% whatsubtype=12345 %>
<% =VarType(whatsubtype) %>

Output:
2

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/vartype.html (2 of 2) [29/07/2002 12:30:46]


DevGuru VBScript Function: WeekDay

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Weekday( )
JavaScript
Jet SQL Weekday(Date, FirstDayofWeek)
VBScript
WML The Weekday function returns the number of the day of the week.
WMLScript
WSH The output is defined by the value in the Date And Time Constants.
XHTML
XML DOM
XSLT CONSTANT VALUE DESCRIPTION
Features
VBSunday 1 Sunday
Ask DevGuru
ASP Resources
VBMonday 2 Monday
HTML Color Chart
Find the Bug
VBTuesday 3 Tuesday
Knowledge Base
Links
Tips of the Week
VBWednesday 4 Wednesday
T-SQL Syntax Charts
Tutorials
VBThursday 5 Thursday
Products VBFriday 6 Friday
dgCalendar
dgCharge VBSaturday 7 Saturday
dgChart
dgEncrypt VBFirstJan1 1 Week of January 1
dgFileUpload
dgReport First week of the year that has at least
dgSort VBFirstFourDays 2
four days
dgTree
Site VBFirstFullWeek 3 First full week of the year
Authoring
Coming Soon Use the date format of the computer's
VBUseSystem 0
DevGuru Resume regional settings
Errata
Link to Us Use the first full day of the week as
VBUseSystemDayOfWeek 0
Merchandise defined by the system settings
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/weekday.html (1 of 2) [29/07/2002 12:30:47]


DevGuru VBScript Function: WeekDay

What's New There is one mandatory argument.


Partners
Code Project Date
DevelopersDex
Prog. Heaven The Date argument is any valid date expression and you may use the Date and Now
Tek-Tips Forum functions.
TopXML
VBXML.COM Code:
VisualBuilder.com <% =WeekDay(Date) %>
W3Schools
XMLPitstop Output:
ZVON.org 3
Search Us!
Code:
<% =WeekDay(Now) %>

Output:
3

Code:
<% =WeekDay("6/26/1943") %>

Output:
7

There is one optional argument.

FirstDayofWeek

The optional FirstDayofWeek argument must only use the constants or values
defined above in the Date And Time Constants.

In this example, Monday is defined to be the first day of the week. Therefore,
Saturday becomes 6.

Code:
<% =WeekDay("6/26/1943", VBMonday) %>

Output:
6

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/weekday.html (2 of 2) [29/07/2002 12:30:47]


DevGuru VBScript Function: WeekDayName

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: WeekdayName( )
JavaScript
Jet SQL WeekdayName(WeekDay, Abbreviate, FirstDayofWeek)
VBScript
WML The WeekdayName function returns the full spelling of the name of the day of the week.
WMLScript
WSH There is one mandatory argument.
XHTML
XML DOM WeekDay
XSLT
Features The WeekDay argument is the number representing the day of the week as defined below by
Ask DevGuru the value in the Date And Time Constants.
ASP Resources
HTML Color Chart
Find the Bug
CONSTANT VALUE DESCRIPTION
Knowledge Base
Links VBSunday 1 Sunday
Tips of the Week
T-SQL Syntax Charts VBMonday 2 Monday
Tutorials
VBTuesday 3 Tuesday
Products
dgCalendar VBWednesday 4 Wednesday
dgCharge
dgChart
VBThursday 5 Thursday
dgEncrypt
dgFileUpload
VBFriday 6 Friday
dgReport
dgSort
VBSaturday 7 Saturday
dgTree
Site VBFirstJan1 1 Week of January 1
Authoring
Coming Soon VBFirstFourDays 2 First week of the year that has at least four days
DevGuru Resume
Errata VBFirstFullWeek 3 First full week of the year
Link to Us
Merchandise Use the date format of the computer's regional
Sponsorships VBUseSystem 0
settings
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/weekdayname.html (1 of 2) [29/07/2002 12:30:49]


DevGuru VBScript Function: WeekDayName

What's New
Use the first full day of the week as defined by the
Partners VBUseSystemDayOfWeek 0
system settings
Code Project
DevelopersDex
Prog. Heaven Code:
Tek-Tips Forum <% =WeekdayName(7) %>
TopXML
VBXML.COM Output:
VisualBuilder.com Saturday
W3Schools
XMLPitstop There are two optional arguments.
ZVON.org
Search Us! Abbreviate

The optional Abbreviate argument is a Boolean value which gives the option of having the
returned day name being abbreviated to the first three characters.

If set to True, the name will be abbreviated. If set to False the name will not be abbreviated.

Code:
<% =WeekdayName(7, True) %>

Output:
Sat

FirstDayofWeek

The optional FirstDayofWeek argument must only use the constants or values defined above
in the Date And Time Constants.

In this example, Monday is defined to be the first day of the week. Therefore, Saturday
becomes 6.

Code:
<% =WeekdayName(6, False, 2) %>

Output:
Saturday

Code:
<% =WeekdayName(6, False, VBMonday) %>

Output:
Saturday

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/weekdayname.html (2 of 2) [29/07/2002 12:30:49]


DevGuru VBScript Function: Year

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Year( )
JavaScript
Jet SQL Year(Date)
VBScript
WML The Year function returns the number of the current year using any valid date
WMLScript expression as an argument.
WSH
XHTML You can also use the Date and Now functions as the argument.
XML DOM
XSLT Code:
Features <% =Year(Now) %>
Ask DevGuru
ASP Resources Output:
HTML Color Chart 1999
Find the Bug
Knowledge Base Code:
Links <% =Year("6/26/43") %>
Tips of the Week
T-SQL Syntax Charts Output:
Tutorials 1943
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/year.html (1 of 2) [29/07/2002 12:30:51]


DevGuru VBScript Function: Year

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/year.html (2 of 2) [29/07/2002 12:30:51]


DevGuru VBScript Keywords

Quick References
ADO All Functions
ASP
CSS2
HTML KEYWORDS: Empty, False, New, Nothing, Null, True
JavaScript
Jet SQL Implemented in version 1.0
VBScript
WML Empty
WMLScript
WSH The Empty keyword is the value that a variable is automatically assigned when it is declared
XHTML using the Dim statement. It is important to understand that this means that a declared variable
XML DOM does have a value, Empty, even if you have purposely not assigned a value in your code.
XSLT
Features You can test whether a variable is empty using the IsEmpty function. Also, Empty is not the
Ask DevGuru same as Null or Nothing.
ASP Resources
HTML Color Chart False
Find the Bug
Knowledge Base The False keyword has the value of 0. You can use that value as a basis for testing in
Links conditional statements.
Tips of the Week
T-SQL Syntax Charts New
Tutorials
Products The New keyword is used in conjunction with Set to create an instance of a Class or a
dgCalendar RegExp. First, using Dim, you must declare the name of the variable that the instance will be
dgCharge assigned. Then, you can create the instance.
dgChart
dgEncrypt Code:
dgFileUpload <%
dgReport Dim SearchPattern
dgSort Set SearchPattern = New RegExp
dgTree %>
Site
Authoring Nothing
Coming Soon
DevGuru Resume The Nothing keyword is used to disassociate an object variable from an object. If several
Errata object variables refer to the same object, all must be set to Nothing before system resources
Link to Us are released.
Merchandise
Sponsorships You must assign Nothing using the Set keyword.
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/keywords.html (1 of 2) [29/07/2002 12:30:58]


DevGuru VBScript Keywords

What's New Code:


Partners <% Set YourObject = Nothing %>
Code Project
DevelopersDex Null
Prog. Heaven
Tek-Tips Forum The Null keyword indicates that a variable contains no valid data. You can assign a variable
TopXML the value of Null and use the IsNull() function to test whether a variable is Null. If you print the
VBXML.COM variable out, the output should be Null.
VisualBuilder.com
W3Schools Also, Null is not the same as Empty or Nothing.
XMLPitstop
ZVON.org True
Search Us!
The True keyword has the value of -1. You can use that value as a basis for testing in
conditional statements.

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/keywords.html (2 of 2) [29/07/2002 12:30:58]


DevGuru VBScript Statement: Exit Property

Quick References
ADO All Statements
ASP
CSS2
HTML STATEMENT: Exit Property
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML Exit Property
WMLScript
WSH The Exit Property statement is used to immediately exit from a Property Get, Property Let,
XHTML or a Property Set statement block.
XML DOM
XSLT It cannot be used in any other procedure.
Features
Ask DevGuru Code:
ASP Resources <%
HTML Color Chart Property Get PieType Month
Find the Bug If Month = "October" Then
Knowledge Base PieType = "pumpkin"
Links Exit Property
Tips of the Week End If
T-SQL Syntax Charts PieType = "apple"
Tutorials End Property
Products %>
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/ExitProperty.html (1 of 2) [29/07/2002 12:31:02]


DevGuru VBScript Statement: Exit Property

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/ExitProperty.html (2 of 2) [29/07/2002 12:31:02]


DevGuru VBScript Function: GetRef

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: GetRef( )
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML GetRef(FunctionOrSubName)
WMLScript
WSH The GetRef function binds a function or subroutine to an event on a DHTML (Dynamic
XHTML HTML) page.
XML DOM
XSLT The required ObjectName is the name of a DHTML object to which the DHTML event is
Features associated.
Ask DevGuru
ASP Resources The required EventName is the name of a DHTML event to which the function or
HTML Color Chart subroutine will be bound.
Find the Bug
Knowledge Base The mandatory FunctionOrSubName argument is the name of a VBScript function or
Links subroutine to which the DHTML event is to be associated.
Tips of the Week
T-SQL Syntax Charts The above must be used with the Set keyword in the following manner:
Tutorials
Products Code:
dgCalendar Set ObjectName.EventName = GetRef(FunctionOrSubName)
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/getref.html (1 of 2) [29/07/2002 12:31:04]


DevGuru VBScript Function: GetRef

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/getref.html (2 of 2) [29/07/2002 12:31:04]


DevGuru VBScript Method: object.Replace

Quick References
ADO All Methods
ASP
CSS2
HTML METHOD: object.Replace
JavaScript
Jet SQL Implemented in version 5.0
VBScript
WML object.Replace (String1, String2)
WMLScript
WSH The Replace method is used to replace text in a regular expression search. It can only be used
XHTML with a RegExp object variable.
XML DOM
XSLT Do not confuse this method with the Replace function.
Features
Ask DevGuru The search string pattern is declared using the Pattern property. You can use the Global
ASP Resources property to limit the search to the first occurrence of a match, or all occurrences.
HTML Color Chart
Find the Bug There are two mandatory arguments. If the search string pattern is found in one or more
Knowledge Base occurrences inside the string designated by the String1 argument, then, as set by the Global
Links property, the first or all occurrences of the search string pattern will be replaced with the
Tips of the Week String2 argument.
T-SQL Syntax Charts
Tutorials Code:
Products <%
dgCalendar Dim RegX
dgCharge Set RegX = NEW RegExp
dgChart Dim MyString, SearchPattern, ReplacedText
dgEncrypt MyString = "Ocelots make good pets."
dgFileUpload SearchPattern = "good"
dgReport ReplaceString = "bad"
dgSort RegX.Pattern = SearchPattern
dgTree RegX.Global = True
Site ReplacedText = RegX.Replace(MyString, ReplaceString)
Response.Write(ReplacedText)
Authoring
%>
Coming Soon
DevGuru Resume
Errata
Output:
Link to Us
"Ocelots make bad pets."
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/regexp_replace.html (1 of 2) [29/07/2002 12:31:08]


DevGuru VBScript Method: object.Replace

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/regexp_replace.html (2 of 2) [29/07/2002 12:31:08]


DevGuru VBScript Function: Sins

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: Sin( )
JavaScript
Jet SQL Sin(Number)
VBScript
WML The Sin function returns the sine for a number (angle).
WMLScript
WSH Code:
XHTML <% =Sin(45.0) %>
XML DOM
XSLT Output:
Features 0.850903524534118
Ask DevGuru
ASP Resources You can also use a negative number (angle).
HTML Color Chart
Find the Bug Code:
Knowledge Base <% =Sin(-45.0) %>
Links
Tips of the Week Output:
T-SQL Syntax Charts -0.850903524534118
Tutorials
Products
dgCalendar
dgCharge
dgChart
dgEncrypt
dgFileUpload
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/sin.html (1 of 2) [29/07/2002 12:31:13]


DevGuru VBScript Function: Sins

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/sin.html (2 of 2) [29/07/2002 12:31:13]


DevGuru VBScript Function: TypeName

Quick References
ADO All Functions
ASP
CSS2
HTML FUNCTION: TypeName( )
JavaScript
Jet SQL TypeName(Varname)
VBScript
WML The TypeName function is used to determine the subtype of a named variable.
WMLScript
WSH There is a companion function VarType that returns the subtype number in
XHTML place of the subtype name.
XML DOM
XSLT The output is the name of the subtype.
Features
Ask DevGuru Code:
ASP Resources <% whatsubtype="This is a string subtype" %>
HTML Color Chart <% =TypeName(whatsubtype) %>
Find the Bug
Knowledge Base
Links
Tips of the Week Output:
T-SQL Syntax Charts String
Tutorials
Products Code:
dgCalendar
<% whatsubtype=12345 %>
dgCharge
<% =TypeName(whatsubtype) %>
dgChart
dgEncrypt Output:
dgFileUpload Integer
dgReport
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Errata
Link to Us
Merchandise
Sponsorships
Testimonials

http://www.devguru.com/Technologies/vbscript/quickref/typename.html (1 of 2) [29/07/2002 12:31:14]


DevGuru VBScript Function: TypeName

What's New
Partners
Code Project
DevelopersDex
Prog. Heaven
Tek-Tips Forum
TopXML
VBXML.COM
VisualBuilder.com
W3Schools
XMLPitstop
ZVON.org
Search Us!

Comments or Suggestions?
Copyright 1999-2002 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information

http://www.devguru.com/Technologies/vbscript/quickref/typename.html (2 of 2) [29/07/2002 12:31:14]

Das könnte Ihnen auch gefallen