Error: ActiveX - Excel - Marco

  ashodd 10:48 18 Oct 07
Locked

Hi All,

I've got a real problem with Excel since a complete system reinstall was preformed. When ever i try and run a macro a horrible error message saying "Error 429: ActiveX Component cant create object" has anybody had this error before or know how to fix it ?

  xania 11:00 18 Oct 07

There's quite a bit about this on the web forums, but the main implication is that Office did not install correctly.

click here
click here

or simply type <Error 429: ActiveX Component cant create object> into your favourite search engine.

  ashodd 12:41 18 Oct 07

Yes i did quite abit of research on the net but the problem seems to range through a lot of differnt programs doing different things. Any other suggestions ?

  xania 13:05 18 Oct 07

My only suggestion is to remove MS Office and reinstall remembering to reboot at every stage.

  silverous 15:11 18 Oct 07

Is it ANY macro, or just particular macros?

  ashodd 15:23 18 Oct 07

we only use one macro and i do not know how to creat them so see if it is ok with other macros, how ever it cant be macro as it works on other machines that try and use it. does that help anwer you question ?

  silverous 16:49 18 Oct 07

It might be that the macro utilises a particular component e.g. of outlook to send an email and that particular component isn't installed.

Can you be certain that the PC has had everything installed that the others have ?

When you installed Office did you choose to install absolutely all options from the hard disk?

  VoG II 17:04 18 Oct 07

Can you post the code and indicate where it is erroring (click the Debug option if it exists)?

Also, in the Visual Basic Editor (press ALT + F11 to open it) Tools > References, make sure everything that needs to be ticked is (e.g. Microsoft Outlook X.XX Object Library).

  ashodd 17:11 18 Oct 07

ok just about to leave work so ill post the code tomorrow morning, thanks alot all.

  ashodd 10:10 19 Oct 07

here is the code for the macro, im sorry i dont really know anything about coding btu i had a look in the References section although not knowing what i was looking for i tried to click on a few references that had either "ActiveX" or "Office" in the title but i kept getting either an error message saying "error loading dll" or "Name conflicts with existing module,project or object library". i've not had time to reinstall office yet on the computer as its not my computer and the person doesnt want to lose the time so ill do that then they go on there lunch. again thanks for all the input.


rivate IAM As Object ' IAMExcelLink.IAMExcel

Private Sub cmdreset_Click()


End Sub

'Use this if you want to change the source
Public Sub ResetSource()

Set IAM = CreateObject("IAMExcelLink.IAMExcel")

If IAM.ResetSourcebook Then
MsgBox "The Source file was successfully changed.", vbInformation, "OK"
Else
MsgBox "Unable to change the source file!", vbExclamation, "Error"
End If

Set IAM = Nothing

End Sub

Private Sub CommandButton1_Click()
ResetSource
End Sub

Private Sub cmdresetAll_Click()

Dim szSourceFile As String

On Error GoTo Err_Trap

Set IAM = CreateObject("IAMExcelLink.IAMExcel")

szSourceFile = IAM.GetSourcebookFromRegistry

If szSourceFile = "" Then GoTo Exit_Sub

IAM.SourceBook = szSourceFile

IAM.DestinationBook = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
IAM.Mode = 0

IAM.SourceSheet = "Stats"
IAM.DestinationSheet = "Sheet1"

IAM.Initialise

IAM.Execute

Exit_Sub:

Set IAM = Nothing
Exit Sub

Err_Trap:

MsgBox Err.Number & ": " & Err.Description, vbExclamation, "Error"
Resume Exit_Sub

End Sub

Private Sub cmdResetData_Click()

Dim szSourceFile As String

On Error GoTo Err_Trap

Set IAM = CreateObject("IAMExcelLink.IAMExcel")

szSourceFile = IAM.GetSourcebookFromRegistry

If szSourceFile = "" Then GoTo Exit_Sub

IAM.SourceBook = szSourceFile
IAM.Mode = 1
IAM.DestinationBook = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name

IAM.SourceSheet = "Stats"
IAM.DestinationSheet = "Sheet1"

IAM.Initialise

IAM.Execute

Exit_Sub:

Set IAM = Nothing
Exit Sub

Err_Trap:

MsgBox Err.Number & ": " & Err.Description, vbExclamation, "Error"
Resume Exit_Sub

End Sub

Private Sub cmdResetGraph_Click()

Dim szSourceFile As String

On Error GoTo Err_Trap

Set IAM = CreateObject("IAMExcelLink.IAMExcel")

szSourceFile = IAM.GetSourcebookFromRegistry

If szSourceFile = "" Then GoTo Exit_Sub

IAM.SourceBook = szSourceFile

IAM.DestinationBook = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name

IAM.SourceSheet = "Stats"
IAM.Mode = 2
IAM.DestinationSheet = "Sheet1"

IAM.Initialise

IAM.Execute

Exit_Sub:

Set IAM = Nothing
Exit Sub

Err_Trap:

MsgBox Err.Number & ": " & Err.Description, vbExclamation, "Error"
Resume Exit_Sub

End Sub

  silverous 10:48 19 Oct 07

Ok,

There's an object called "IAMExcelLink" that is required for that code to work. Does the spreadsheet link to an appplication somehow via some code that someone developed?

It sounds to me like some kind of custom developed code that is used in the spreadsheet - you'll need to ensure whatever it is is reinstalled on the PC.

Kind Regards,

Paul

This thread is now locked and can not be replied to.

Surface Pro 5 News - release date, UK price, features, specs

Gear VR vs. Daydream: Which delivers the best VR experience?

iPad Pro 12.9 vs Surface Pro 5