Questions tagged [createobject]

The CreateObject function is used to instantiate COM objects.

The CreateObject function is used to instantiate COM objects.

Example (VB Late Binding):

Dim obj As Object
Set obj = CreateObject("Outlook.Application")

Example (VB Early Binding):

Dim obj As Outlook.Application
Set obj = CreateObject("Outlook.Application")

Related Tags:

Links:

154 questions
169
votes
9 answers

Failed to execute 'createObjectURL' on 'URL':

Display Below error in Safari. Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided. My Code is: function createObjectURL(object) { return (window.URL) ? window.URL.createObjectURL(object) :…
Hardik Mandankaa
  • 2,154
  • 3
  • 19
  • 27
14
votes
2 answers

Check if folder is there, if not create it on current user logged in VBS

Currently this is my script Set oWS = WScript.CreateObject("WScript.Shell") ' Get the %userprofile% in a variable, or else it won't be recognized userProfile = oWS.ExpandEnvironmentStrings( "%userprofile%" ) What I am trying to do is grab the…
user2281912
  • 153
  • 1
  • 1
  • 6
13
votes
3 answers

Question about CreateObject() in VB6 / VBA

I can do this: Dim fso As New FileSystemObject or I can do this: Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") How do I know what string to use for CreateObject? For example, how would I know to use the "Scripting." part…
Shane Miskin
  • 1,873
  • 2
  • 22
  • 30
11
votes
5 answers

Server.CreateObject( ) failure with 32 bit Windows and IIS 7

Windows 7 32 bit, IIS 7.5.760016385 I created a DLL in Visual Basic 6.0 and trying to use it from within classic ASP code: set obj = Server.CreateObject("a.b") I get the following error: 006 ASP 0178 Server.CreateObject Access Error The call…
user1894838
  • 111
  • 1
  • 1
  • 4
9
votes
1 answer

CreateObject randomly throws "A system shutdown has already been scheduled" error

I googled and SO'd, and nothing. My job revolves around making my co-workers lives easier. Currently, they are using very clunky spreadsheets designed 10+ years ago. In the process of migrating their tools and reports to the local intranet using…
user3205578
8
votes
2 answers

VBScript create excel 2016 object

I have two versions of excels(2010 and 2016) installed on my machine. I would like to run a vbscript on excel 2016. However, the CreateObject("Excel.Application") only creates excel 2010. How can i change this to 2016?
Ray Lin
  • 97
  • 2
6
votes
1 answer

CreateObject() object List for vbs

I like scripting, I don't like to reinvent the wheel, so I like CreateObject Can you please point me to a extense and useful list of objects that can be used on VBScript with a brief description. Really I haven't found a site with more than 50. …
Luis Siquot
  • 6,263
  • 3
  • 29
  • 52
6
votes
4 answers

What is the difference between using cfinvoke and createObject to run a component function?

In my company's code, I've often seen component files used by initializing an object of that component and calling the methods off the object. However, it seems to me somewhat more straightforward to use the cfinvoke method, especially when only…
froadie
  • 71,770
  • 69
  • 154
  • 228
6
votes
2 answers

VBA CreateObject

I am stranded on this code line since 10th of January where i got it in an email and i found out i had to learn class modules so i did and returned to ask on a new basis now. The code line is (Critical Warning: you have to go to Tools--> References…
ExoticBirdsMerchant
  • 1,226
  • 7
  • 23
  • 53
6
votes
1 answer

Passing arguments to constructors using CreateObject in Coldfusion

I'm trying to use a Java object in Coldfusion using the CreateObject function. This works fine when the constructor in the Java class doesn't take any arguments e.g.: MyObject myObject = new MyObject(); Goes to myObject = CreateObject("java", …
Loftx
  • 1,691
  • 4
  • 27
  • 49
5
votes
1 answer

"Server.CreateObject Failed" on COM+ component creation from classic ASP on IIS 7

I have a classic ASP application running on IIS 7 in Windows Server 2008 R2 Standard. It was working fine at one point in the day when suddenly, without any code changes, it began throwing the following error while instantiating a COM+…
ErikE
  • 43,574
  • 19
  • 137
  • 181
4
votes
0 answers

What is the difference between creating a COM instance through CreateObject versus ActiveXObject?

This has been touched on here in the second answer but I don't see how it answers the question (nor does the link provided). What can ActiveXObject do that CreateObject cannot, and vice-versa?
JohnZaj
  • 2,900
  • 5
  • 33
  • 50
4
votes
1 answer

What is the difference between declaring connection via object tag and Server.CreateObject

When using classic ASP, what is the difference between declaring connection via object tag: and declaring the connection via the Server.CreateObject() call: set cn =…
slolife
  • 18,415
  • 19
  • 75
  • 116
4
votes
1 answer

Call non-default constructor of COM class

I have a DLL (written in C#) containing a class with 2 Constructors; a default (no arguments) constructor, and another one with 3 arguments. In VBscript, I want to call the second constructor, but CreateObject only receives a classValue parameter,…
Elist
  • 4,985
  • 3
  • 30
  • 66
4
votes
1 answer

ColdFusion Initializing a Java object method that requires an external config file

I've been banging my head on this for a while, can't seem to find any decent answers or explanations for these errors. I am using a 3rd party JAR "PropHandler.jar" I am trying to call the getMessageList method, it accepts 3 args and requires a…
Wes
  • 181
  • 3
  • 12
1
2 3
10 11