Solved

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

Posted on 2003-11-11
6
3,457 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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 …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

920 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

16 Experts available now in Live!

Get 1:1 Help Now