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:

161 questions
251
votes
12 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
  • 3,129
  • 4
  • 23
  • 32
14
votes
3 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,911
  • 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. …
Saic Siquot
  • 6,513
  • 5
  • 34
  • 56
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
  • 79,995
  • 75
  • 166
  • 235
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,466
  • 8
  • 28
  • 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,760
  • 4
  • 29
  • 50
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
  • 48,881
  • 23
  • 151
  • 196
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
  • 3,080
  • 5
  • 37
  • 51
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
  • 19,520
  • 20
  • 78
  • 121
4
votes
1 answer

How to dynamically append children to QML item that has alias for child items

Let's say I have a TestComponent.qml that uses alias for child items. The component file looks like this: TestComponent.qml import QtQuick 2.5 Column { default property alias children: cont.children; Text { text: "header" } …
tach
  • 663
  • 12
  • 19
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
  • 5,313
  • 3
  • 35
  • 73
1
2 3
10 11