FREE Web Template Download
HTML CSS JAVASCRIPT SQL PHP BOOTSTRAP JQUERY ANGULARJS TUTORIALS REFERENCES EXAMPLES Blog
 

VBScript CreateObject Function


Full Reference Complete VBScript Reference

The CreateObject function creates an object of a specified type.

Syntax

CreateObject(servername.typename[,location])

Parameter Description
servername Required. The name of the application that provides the object
typename Required. The type/class of the object
location Optional. Where to create the object

Example

Example

Creating a regular expression object:

<%

txt="This is a beautiful day"
Set objReg=CreateObject("vbscript.regexp")
objReg.Pattern="i"
response.write(objReg.Replace(txt,"##"))

%>

The output of the code above will be:

Th##s is a beautiful day
Show Example »

Full Reference Complete VBScript Reference