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

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?
mash79Asked:
Who is Participating?
 
mgroyalConnect With a Mentor Commented:
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
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
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 Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
SQLMasterCommented:
You have to check in other machines whether they have Excel, MDAC,Microsoft Chart (Excel Chart) installed on other machines

Cheers
0
 
mash79Author Commented:
Sorry SQLMaster, could only split between 3.
0
 
mash79Author Commented:
Sorry SQLMaster, could only split between 3.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.