Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Library not defined error

$
0
0

Hello everyone !!

I am facing a very weird problem which I cannot seem to solve. I have a Project file with macro running. It was perfectly fine until last week. I fired up project today morning and I am getting the following error :

Run Time error '-2147319779 (8002801d)':

Automation Error

Library not registered.

     

Option Compare Text
Option Explicit

Dim Pjt As Project
Dim ToBeOutdent, line As Integer

Sub GenererGantt()
Dim tsk, tsk2 As Task
Dim TskID(10), Test_Number2, Test_Duration, Test_Qty As Integer
Dim Defect_rate As Double
Dim PN, PrevTask, Test_Name, Test_PartNumber, Test_MakeBuy, Test_Phantom, Test_Supplier, Test_Inspection, Test_StdCost As String
Dim XL As Excel.Application


    Application.AppMaximize

    'Input name of Excel file where data are stored (from folder "D:\Documents\My Delivery Maps\")
    PN = InputBox("Enter Excel file name")
    If PN = "" Then Exit Sub

    'Project creation
    Application.FileNew False, , False
    Set Pjt = Application.ActiveProject
    Pjt.ScheduleFromStart = False

 Set XL = New Excel.Application
    XL.Workbooks.Open ("D:\Documents\My Delivery Maps\" & PN & ".xlsx")

 The bold-italic area is where it is showing the error. (New Excel.Application)

Steps after the error : 

1. I have repaired my Office 2010. I currently use the Project 2013 version.

2.  I unregistered and reregistered  MSCOMCTL.OCX file.

3. I have checked the reference for Excel in the reference section. 

The problem is still persisting. Any help on this would be HUGE !!

Thanks,

Abhi


Viewing all articles
Browse latest Browse all 5347

Trending Articles