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

Write to Excel Object

I am trying to write a code that exports data to excel after user prompted actions. Basically, I have been able to export to Excel successfully, but the 2nd instance I want to write to a new tab instead of a new Excel application. oExcel =…
jrod404
  • 3
  • 1
0
votes
2 answers

Overriding CreateObject Function in VBScript

I want to override the default CreateObject() function in VBScript with my own. Basically this example in VB6: http://www.darinhiggins.com/the-vb6-createobject-function/ I cannot figure out is this line: Set CreateObject = VBA.CreateObject(Class$,…
Rahim
0
votes
1 answer

CreateObject doesn't work in Class Module (Visual Basic 6)

in a VB6 project, this code worked for sending an email via Outlook 2013 using the Microsoft Office Outlook 15.0 Object Library: Private Sub Command1_Click() Dim objOutlook As Outlook.Application Set objOutlook =…
0
votes
2 answers

Read a Text file which has huge line (more than 1024 characters) using VBA macro

I need to pick a particular data from a text file. But this text file has data which is more than 1024 characters on a single line. For eg: I need data between string text1 and text 2. My code takes only the first data between text1 & text2 in the…
Suresh
  • 15
  • 1
  • 5
0
votes
1 answer

CreateObject equivalent in C++

Good morning. I have read a lot of similar topics in this forum and in the internet, but I didn't find the solution for my problem. I'm just trying to convert this VB lines in C++: Dim OR As Object Dim info as String OR =…
merch
  • 895
  • 7
  • 17
0
votes
1 answer

CreateObject fails for Com visible dll

I have a com visible dll that I am trying to call from classic ASP. I have successfully registered it using regasm and I'm still hitting the following error. 0x80131600 - Server object: 006~ASP 0177~Server.CreateObject Failed~80131600 the…
0
votes
1 answer

Can I use CreateObject to print a .tif document with vba? If not, what?

The following vba routine works well to print a word document If sHlink <> "" Then Set OfficeObject = CreateObject("Word.Application") OfficeObject.Documents.Open sHlink OfficeObject.PrintOut…
plh
  • 1
  • 2
0
votes
0 answers

IIS8 Server object error 'ASP 0177 : 800401f3' at Server.CreateObject("ADODB.Recordset")

I get the following error: Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed /loadHome.asp, line 15 800401f3 Line 15 is Set checkUser = Server.CreateObject("ADODB.Recordset") I am using .NET Framework 4.0, also registered…
0
votes
1 answer

How to access object created in serialized way?

This is my code: where i click the right button of mouse, and select test1 the code create a JLabel and put it in that position. public class Test extends JFrame { int x; int y; JPopupMenu menu = new JPopupMenu("Popup"); …
0
votes
1 answer

Create Object named by String

Is it possible to create a method that can create objects named by String? private static int a = 0; public static void CreateNew() { Object ("number" + a) = new Object(); a++; } If you know, how would I do it?
0
votes
1 answer

Determining whether a dll is present or not

I want to use DotNet-dlls within VBA code. But I want to be able to determine whether a dll is present or not before I declare the object with CreateObject. Is it possible to use a dotnet dll without using Regasm? I have a MS Access database and I…
Gerrit Horeis
  • 475
  • 5
  • 13
0
votes
2 answers

VBA Excel 2010 CreateObject ExtendedProperty get image width attribute

I'm using similar kind of functions to get some property attributes like Filename, bit depth, dimensions, size etc by using some vba code. The last line of that function would be something like the following: PicSize =…
0
votes
1 answer

VB6 memory leak from CreateObject

I'm using an eternal library (DLL) to load in a certain file format and have found out that the load function doesn't actually load. It will load the first time it's called for the same object but if I call it again to open a new file it doesn't…
HandOfCode
  • 29
  • 3
0
votes
1 answer

Entityframework, control creation of a new object

I am trying to update an object of class Transaction public int Id { get; set; } public System.DateTime Date { get; set; } public string Remarks { get; set; } public double Amount { get; set; } public Nullable GroupId {…
tusharmath
  • 9,120
  • 11
  • 52
  • 70
-1
votes
0 answers

I don't know how to properly escape the quotes in a deeply-nested VBScript command

I don't understand how to apply the escaping rule as it applies to deeply-nested quotes. Can someone help to clarify how to properly arrange the quotes to get this command to work. Obviously I haven't tried everything or it would be working by…
1 2 3
10
11