w3schools    w3Schools
Search :
   
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
ADVERTISEMENTS

XML Certification
Download XML editor
Custom Programming
 
Table of contents
VBScript Tutorial
VB HOME
VB Introduction
VB How to
VB Where to
VB Variables
VB Procedures
VB Conditional
VB Looping
VB Summary

Examples
VB Examples

References
VB Functions
VB Keywords

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

Browse Tutorials
 

VBScript CreateObject Function


VBScript 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 1

dim myexcel
Set myexcel=CreateObject("Excel.Sheet")
myexcel.Application.Visible=True
...code...
myexcel.Application.Quit
Set myexcel=Nothing


VBScript Reference Complete VBScript Reference