Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Runtime error 429- Active X Component can't create object

Posted on 2009-04-05
13
Medium Priority
?
708 Views
Last Modified: 2012-06-21
I have one computer that continues to generate this error when trying to execute the following code (which works fine on other computers...)

When clicking debug, the following line is highighted:
Set myOlApp = CreateObject("Outlook.Application")

Here is what I have tried:
1.) Confirmed this function works on other computers.  It does.
2.) Confirmed no references are "missing" and that they are the same as the computers where this function runs correctly.
3.) "Ran"regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL" to reregister the DLL.  Message received was that the registration was successful.
4.) Re-installed MS Office 2000 SP-3.

What else can I do on this...?  After all of the above- still receive this error and Outlook does not open...


Thanks

Public Function AssignmentEmail()
 
    Dim myOlApp As Object
    Dim myItem As Object
        
    Set myOlApp = CreateObject("Outlook.Application")
    Set myItem = myOlApp.CreateItem(olMailItem)
 
   
            With myItem
                .To = Me.T_EXPERT_EMAIL
                .SentOnBehalfOfName = Nz(DLookup("default_email", "tblcurrentuser"))
                '.BodyFormat = olFormatRichText
                .BodyFormat = olFormatPlain
                If Me.T_PRIORITY = 1 Then
                .Importance = olImportanceHigh
                .Subject = Format(Me.T_TICKET_NBR, "00000") & "-IST *PRIORITY* Ticket-Category: " & Me.T_CAT_NAME
                Else
                .Subject = Format(Me.T_TICKET_NBR, "00000") & "-IST Ticket-Category: " & Me.T_CAT_NAME
                End If
    
        
             End With
 
    
    Set myItem = Nothing
    Set myOlApp = Nothing
 
End Function

Open in new window

0
Comment
Question by:snyperj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 24071544
0
 

Author Comment

by:snyperj
ID: 24071550
Thanks. I have ruled out all 5 of those potential causes.  How about an improper version of MDAC?  Could that potentially be the problem?
0
 
LVL 8

Expert Comment

by:Emil_Gray
ID: 24071561
I would suggest totally uninstalling MS Office before reinstalling. I also would suggest you use "YourUninstaller" which can be downloaded and used for 21 days for free http://www.ursoftware.com/ to do so.
I ran your code and had no problems.
0
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 

Author Comment

by:snyperj
ID: 24071699
Tried uininstalling with Your Uninstaller.. and re-then installed.  

Same end result.  Good 'ol microsoft.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24071754
you are using late binding so references shouldnt be an issue.
problem seems to be with outlook so I dont think dao has anything to do with it.

Could be the library it uses (for outlook automation) has not registered properly or is corrupt for whatever reason. Thin is you said you have reinstalled, dunno if it clears down dll's or not.

Not sure what the dll is, I think you need to look out for msout*.*
either in windows dir\system32 or directory where office is installed

might be worth registering it   regsvr32 <nameoffile>. This has gotta be done on the problem pc.
0
 

Author Comment

by:snyperj
ID: 24071757
thanks... I see if I can search out he Outlook DLL and try to re-register...
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24071782
if u try to add the reference (so as to use early binding) then that should be one way to find it. eg office 2003 is office 11.0 and when u click it, it shows the path below.
0
 

Author Comment

by:snyperj
ID: 24071795
oK..thanks...using Outlook 2007 in correlation with Office 2000 (again...only a problem on this computer- fine everywhere else..)

Can I register an OLB file?

Clipboard01.jpg
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24071822
dont think u can

now which outlook do you want to open, version in office2007 or office2000?

maybe worth specifying version? eg createobject("outlook.application.12") for office2007. Having 2 versions could be the reason why you are getting this problem.

the fact that you got the reference defined means you do not have to create the object. You can do this
 
    Dim myOlApp As outlook.application
       
    Set myOlApp = new outlook.application

0
 

Author Comment

by:snyperj
ID: 24071833
Outlook 2000 is not installed any longer.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24071849
well if u add the reference then u are using early binding so u can define and instantiate the variable like I said instead of having to create an object
0
 

Author Comment

by:snyperj
ID: 24071889
Your right...it worked... Outlook opened ....

I am concerned though because I still have problem on this computer that doesn't exist on others- but I appreciate getting this code piece working.

The early binding, late binding is not clear to me so I am sure I have used create object elsewhere too...
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 2000 total points
ID: 24072008
simple explanation

early binding - this is when you add the reference in your database. Advantages are that you get to use the objects with their names, any constants are defined for you, can make use of the intellisense menu. Disadvantage of course is if you deploy this on a PC where that reference doesnt exist or the path differs then it will fail to run

late binding - You do not add the reference, have to create objects yourself and know the methods and properties available to use. Plus you have to substitute the constants with values (can be done by you defining your own constants). Advantage is you do not have to worry about broken references, differing paths. Disadvantage (though not too much nowadays considering the power of pc's) is the overhead in creating an object. also if you have different versions of that object installd, it may pick the wrong one (like in this case)

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question