adsense


Showing posts with label ADVANCE VB SCRIPT OBJECT. Show all posts
Showing posts with label ADVANCE VB SCRIPT OBJECT. Show all posts

Monday, 9 November 2015

ADVANCE VB SCRIPT OBJECT PAGE 97

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button




ADVANCE VB SCRIPT OBJECT





What is an Object? 


VBScript runtime objects help us to accomplish various tasks. 
This section will help you understand how to instantiate an 
object and work with it. 
Syntax 
In order to work with objects seamlessly, we need to declare 
the object and instantiate it using Set Keyword. 
Dim objectname    'Declare the object name 
Set objectname = CreateObject(object_type) 
Example 
In the below example, we are creating an object of type 
Scripting.Dictionary. 
Dim obj   
Set obj = CreateObject("Scripting.Dictionary") 
Destroying the Objects 
The significance of destroying the Object is to free the 
memory and reset the object variable. 
Syntax 
In order to destroy the objects, we need to use Set Keyword 
followed by the object name and point it to Nothing. 
Set objectname = Nothing 'Destroy the object. 
Example 
In the below example, we are creating an object of 
type Scripting.Dictionary. 
Dim obj   
Set obj = CreateObject("Scripting.Dictionary") 
Set obj = Nothing.