Solved

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

Posted on 2003-11-11
6
3,462 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
[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
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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

734 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