Solved

VB Excel Automation Error "ActiveX component can't create object"

Posted on 2003-11-11
6
3,456 Views
Last Modified: 2013-12-26
Hi,
 I am getting the following error message

Run-time Error 429 ActiveX component can't create object

 
    Dim sSQL As String
    Dim rRS As ADODB.Recordset
    Dim oExcel As Object        ' Excel application
    Dim oWorkBook As Object      ' Excel workbook
    Dim oSheet As Object     ' Excel Worksheet
    Dim oChart As Object     ' Excel Chart
    Dim iCount As Integer
    Dim commonDialog As Object
    Dim iTop As Integer
    Dim sPreviousDay As String
    Dim iFirstDay As Integer
    Dim iChartNumber As Integer
   
   
    Set oExcel = CreateObject("Excel.Application")
    Set oWorkBook = oExcel.Workbooks.Add
    Set oSheet = oWorkBook.Worksheets.Item(1)
    oSheet.Name = "Web Tracking"
   
 This is how i am creating the excel document.


 I have read many articles about refernces etc, but non seem to work.

It works fine on my PC, but not on other peoples.

Any clues?
0
Comment
Question by:mash79
6 Comments
 
LVL 2

Accepted Solution

by:
lttia1 earned 20 total points
ID: 9729043
0
 
LVL 1

Assisted Solution

by:mgroyal
mgroyal earned 20 total points
ID: 9729603
You need to register the ActiveX components (OCX) on every workstation. You can download Setup/Install-Maker-Programs which are doing this job for you.  
0
 
LVL 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 20 total points
ID: 9730617
I see that you are using a recordset. Are other PCs have the same version of the MDAC_TYP that you have on your PC. Do they have Excel.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 3

Expert Comment

by:SQLMaster
ID: 9731788
You have to check in other machines whether they have Excel, MDAC,Microsoft Chart (Excel Chart) installed on other machines

Cheers
0
 

Author Comment

by:mash79
ID: 9735185
Sorry SQLMaster, could only split between 3.
0
 

Author Comment

by:mash79
ID: 9735186
Sorry SQLMaster, could only split between 3.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now