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
2
votes
2 answers

Creating an instance of Visio in vba when 2 versions are installed

I have the below code to create an instance of Visio from Excel. It works on machines where I have a single version of Visio installed, but on some machines I have 2 versions (2010 and 2016) installed. On these machines it fails to run with the…
Rwood
  • 65
  • 3
2
votes
1 answer

Why is CreateObject with a dot-notation path to the component not working using CF Administrator Mappings that define the path to the CFC directory?

I am working on a web app already on the production server based on CF code that uses and depends on the CF Administrator Mappings to locate CFCs. I have a directory structure like this: Webroot/ _TaskDir/ Application.cfm myFile.cfm …
teaman
  • 453
  • 7
  • 18
2
votes
2 answers

insert image in a iframe at caret location

For a rich text box. I want to insert a picture, selected by the user, at the caret's position. First I tried that: var loadImage = function(event) { var editor = editFrame.document; editor.execCommand("insertImage", false,…
2
votes
0 answers

url-createobjecturl-no-longer-accepts-mediastream - after Chrome update on 14.12.2018

Explanation of the problem and scenario. I have a web app, that use a AngularJS component to take picture. However, after the last update on Google Chrome in 14.12.2018, this component stopped to work. I did search about the issue and i found out…
2
votes
0 answers

WScript.CreateObject throwing "Could not create object" error in Windows Server 2016

I am trying to create an object using WScript.CreateObject("ProgID of com.dll"). CreateObject method was working fine in Windows server 2008 and windows server 2012. But in windows server 2016, CreateObject method is not able to instantiate for a…
Anny
  • 21
  • 7
2
votes
1 answer

Classic ASP/VBScript Client Side CreateObject( "ADODB.Recordset" ) returning empty

Looking for assistance troubleshooting/diagnosing an issue that is showing up with a Classic ASP/VBScript web application I am currently supporting. Over the past couple of weeks I've had users reporting issues in the app, troubleshooting with them…
Brad853
  • 21
  • 1
2
votes
1 answer

Excel VBA CreateObject: Run-time error '432': File name or class not found during Automation operation

How do I fix the error "Run-time error '432': File name or class not found during Automation operation" I get when calling "CreateObject("Scripting.FileSystemObject")" in Excel VBA? I have a spreadsheet with a macro that works on two other computers…
user2411357
  • 53
  • 1
  • 5
2
votes
3 answers

How to determine the association between a VB6 app and an exe instanced with CreateObject()

We need to figure out how a service can peek at a running VB6 app and/or its DCOM spawned exe and figure out which VB6 app goes with which DCOM exe. The VB6 app and the spawned exe are both on the same server. We have a VB6 app that spawns an…
arg342
  • 21
  • 3
2
votes
1 answer

VBA: Shell.Application Namespace function fails dependent on variable declaration in calling sub

I have encountered a situation where the Shell.Application object's Namespace method appears to fail dependent on the absence of a variable declaration in the calling sub. A simplified test case is below: Function…
user1379351
  • 643
  • 1
  • 5
  • 15
2
votes
4 answers

VB6 app not executing as scheduled task unless user is logged on

I would greatly appreciate some help on this one! It may be a tricky one. :) Problem I have an VB6 application which is set up as scheduled task. It starts every time, but when executing CreateObject() it fails if a user is not logged on to…
Tedd Hansen
  • 11,020
  • 14
  • 57
  • 93
2
votes
1 answer

Classic ASP using C# .net DLL Object doesn't support this property or method

Hey all this is my first time creating a COM object for a classic asp page. The process I followed when creating this COM DLL is this: 1) Used the Strong Name Tool (sn.exe) and placed the .snk file within the app. (sn -k myKey.snk) 2)…
StealthRT
  • 9,252
  • 35
  • 155
  • 302
2
votes
1 answer

uml sequence diagram: create objects in a loop

In a sequence diagram i am trying to model a loop that creates a bunch of objects. i have found little information online regarding the creation of multiple objects in an SD diagram so i turn to you. The classes are Deck and Card Cards are created…
chaixdev
  • 102
  • 9
2
votes
3 answers

Why doesn't code work in VB.net, but works in VBA; GetObject

VBA code works great: Sub testVBA() Dim wb As Object ' Lotus123.Document Set wb = GetObject("S:\Temp\T\0375D.WK3", "Lotus123.Workbook") End Sub VB.net code fails: Sub TestVBNet() Dim wb As Object ' Lotus123.Document wb =…
D_Bester
  • 5,040
  • 5
  • 29
  • 71
2
votes
3 answers

convert early binding to late binding without changing object type

This seems like a simple question but I after chasing forums for several hours I think it might be impossible. I often want to convert a program from early binding to late binding. Usually, it is a vba, visual basic for applications, program that…
2
votes
1 answer

Error 91 using CreateObject on XP machines

I have an old VB6 app that I've distributed to several users running XP, Windows 7 and Windows 8. The following code is throwing an Error 91 ""Object variable or With block variable not set". Const ssfPERSONAL = 46 'set directory to the common…
John Marzion
  • 113
  • 2
  • 6
1 2
3
10 11