473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Any difference between 'New' and 'CreateObject' in automation?

Is there any difference between 'New' and 'CreateObject' in automation?
As in.....

Dim xlobj as Excel.application
Set xlobj = New Excel.Application
or
Set xlobj = Createobject("Excel.application")

I understand that create object is normally used in late binding but that is
not what I'm interested in.
In early binding does it matter which is used?

Pete

Nov 13 '05 #1
2 3024
They are different.

A google search on the term
CreateObject vs New

brings up a whole slew of hits.
Essentially though, you only really need to worry about the difference if
you are coding for MTS (or COM+) applications.
--
Terry Kreft
MVP Microsoft Access
"Peter" <ru***@127.0.0.1> wrote in message
news:Ls********************@pipex.net...
Is there any difference between 'New' and 'CreateObject' in automation?
As in.....

Dim xlobj as Excel.application
Set xlobj = New Excel.Application
or
Set xlobj = Createobject("Excel.application")

I understand that create object is normally used in late binding but that is not what I'm interested in.
In early binding does it matter which is used?

Pete

Nov 13 '05 #2
What a good idea.......
A google search on the term
CreateObject vs New
brings up a whole slew of hits.


but it is Friday and my brain is trying to switch off.

I see what you mean now that I've looked.

Thanks

Pete
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Arie Kanarie | last post by:
Hello, I want to start with learning VB for my work. I'm a Industrial Automation engineer and i want to know what the difference is between VB6 and VB.NET. Is VB.NET just an anaother word for...
0
by: Roland Johann | last post by:
On my Windows Server 2003 Web Edition I have installed an application which offers some OLE Automation Objects. On my local system (W2k Prof) it works fine but on my server 2003 I have a big...
2
by: Paul Hanchett | last post by:
I want to do some Win32 application automation from JavaScript. Is it possible? Failing that, is there a way to execute an application from JavaScript? Paul
4
by: DaveS | last post by:
Hi! I need help opening a Word document from within an Access 2000/XP mdb. I'm using Shell to open the document, but the Access code continues to run past the Shell statement. What I need is...
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
10
by: NickP | last post by:
Hi there, I was wondering if there was any way to stop "CreateObject" from accessing "131.107.115.28" when called? Unfortunately it is raising a warning with Norton Personal Firewall and seems...
4
by: Volker Hetzer | last post by:
Hi! After messing around for some time with Tcl/Tk and VBScript, we've finally reached the point where we need to put some speed into our applications. So, our typical application looks like...
2
by: A.Dagostino | last post by:
Hi, I try to Use Excel.Application Library on an ASP page like this Server.CreateObject("Excel.Application") i get this error: ASP error '800a01b0' File name or class name not found during...
9
by: salad | last post by:
I have the following code. I have a reference to the Outlook library in the reference list. My machine is standalone, not on a network. Dim Olapp As Outlook.Application Set Olapp =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.