Solved

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

Posted on 2003-11-11
6
3,458 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 70

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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

808 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