Jump to content
Tom Wellige


Recommended Posts

Creates an instance of the given COM object.


Dim fso
Set fso = PBXScript.CreateObject ("Scripting.FilesystemObject")
Set fso = Nothing

This function directly calls the CreateObject function of the VBScript engine.


Do not forget the set an object explicitly back to Nothing once you don't need it any longer. With this you notify the scripting engine that it's memory can be reused/deleted immediately. Thus you help the scripting engine in it's memory management job.


Please do not mistake this function (or the standard VBScript CreateObject function) with the WScript.CreateObject function. By principle they do the same, but differ in their second optional parameter. While the VBScript CreateObject function takes the name of another machine as second parameter to open a DCOM connection, WScript.CreateObject takes the name of a function to handle standard COM/DCOM messages, i.e. the name of a so called event sink.


More information on this can be found here:

Share this post

Link to post
Share on other sites

  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.