Visual Basic > Visual Basic Forums > Visual Basic Interop and Upgrade > error -2147024894 (80070002) Automation Error
Ask a questionAsk a question
 

Answererror -2147024894 (80070002) Automation Error

  • Wednesday, August 29, 2007 3:09 AMDave Patricio Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi guys,

    this too is in relation to this thread.

    i'm having problems running the vb6 app, and the error occurs when i make the form show. i've followed the instructions from the help file and still the problem arises everytime.

    here's another weird thing, when i added the interop form to an existing vb6 application, it was ok when run inside the ide. when i compiled this to an .exe file, the error happened. i also tried creating fresh vb6 app and it worked, so any ideas on this issue? thanks.

    dave.

Answers

  • Friday, August 31, 2007 9:33 PMJonathan Aneja - MSFTModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi Dave,

     

    When you ran it as an .exe file did you have your .NET Dll in the same directory?  On a target machine you need to run regasm (with /codebase if you want a relative path).  If you have a dependency on stdole.dll, do you have that in the GAC? (If you don't have it referenced in your .NET project then don't worry about this one).

     

    Hope that helps, let me know if you're still having issues with it.

     

    Jonathan

All Replies

  • Friday, August 31, 2007 9:33 PMJonathan Aneja - MSFTModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi Dave,

     

    When you ran it as an .exe file did you have your .NET Dll in the same directory?  On a target machine you need to run regasm (with /codebase if you want a relative path).  If you have a dependency on stdole.dll, do you have that in the GAC? (If you don't have it referenced in your .NET project then don't worry about this one).

     

    Hope that helps, let me know if you're still having issues with it.

     

    Jonathan

  • Saturday, September 01, 2007 2:55 PMDave Patricio Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi jonathan,

    i had a fun time trying to figure out the problem, and yes i even tried your solution before. something must've been wrong with either my vs2005 or vb6 installations, because at one last desperation attempt, i reinstalled everying and it worked. thanks for the advice.

    dave.
  • Tuesday, September 04, 2007 5:14 PMPaola87 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    hello Jonathan...

    It's urgent... I need your help please...

    I have the same error number that Dave...

    Well, I have a COM created in .net, when I ran regasm with the correct path  the type library is registered succesfully, after that I add it in the references of my application in Vb 6.0, I declare the instance and the object succesfully but when i try to run the application I can't because the project gave me an error, "Runtime error Automation Error" and select with yellow color the line of the instance...

    please help me... I don't know about this!!!!

  • Tuesday, September 04, 2007 10:55 PMDave Patricio Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi Paola

    can you tell post here what steps you took to arrive to that error and the line of code highlighted in yellow?

    Dave

  • Tuesday, September 04, 2007 11:03 PMPaola87 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I fixed the problem 2 hours ago... You need my help??? 

  • Tuesday, November 13, 2007 8:54 PMFred7603 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Paolo87, maybe you can share your solution with us?

     

  • Wednesday, December 05, 2007 8:29 PMThulasiram Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Dave,

            I have com dll. I register using regasm, its register success.

    While calling that file in the Formware VBA application following error I’m getting.

     

    Error Description

    -------------------------------------- 

    Automation error
    The system cannot find the file specified.

    --------------------------------------

    Error Number -2147024894

    --------------------------------------------

     

    Here is my Code.

    Private Sub FWEvents_OnTransactionEnd()
    Dim ss1 as String  

    Dim ss2 As String
    Dim objGetDeal As New Lending_Service_Captiva.CaptivaService
     
     ss2 = objGetDeal.RetrieveLoanByAppId(ss1)   

    End Function

    Can you hlp me on this issues pls.

     

    Thnaks & Reagds,

    Ram

     

     

  • Thursday, February 21, 2008 6:44 PMHoward N Davis Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I am having a similiar issue even though I followed all the stepw above.  The I do get the com error when I run regasm from the project run when build successful ( vs 2005).  If I do the steps manually then I get the error when I run the app, which is a vba app in excel 2003;

     

    This is my post build step in the project.

     

    tlbexp.exe $(TargetName) /outEmbarrassed(TargetName).tlb

    C:\WINNT\Microsoft.NET\Framework\v2.0.50727/regasm.exe /verbose $(TargetPath) /tlbEmbarrassed(TargetName).tlb

     

     

     

  • Tuesday, April 22, 2008 6:30 PMAsheeshSingh Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hey i am having same problem, please tell me the solution...its very urgent..thanks in advance, Asheesh

  • Tuesday, April 22, 2008 10:40 PMDave Patricio Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi asparihar,

    are you running your solution on a different pc? do a regasm on your .dll and .tbl files to avoid receiving this error Smile

    dave.
  • Friday, November 28, 2008 10:12 AMsavage7 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I ran into this exact same problem.  I was loading a .NET COM visible assemby via a Late Bound COM call from VB6.  Use the "\codebase" argument in my REGASM registration command line script fixed this problem for me.

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm.exe MyDotNetComDLL.dll /tlb:MyDotNetComDLL.tlb /codebase

  • Monday, September 14, 2009 1:03 PMBruno Vellego Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I´m having the same problem too. And i realy need help to solve this... i search it in all google pages but cant find the solution...

    Bruno
  • Wednesday, November 04, 2009 12:52 PMcleverest Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have same problem i looked for it in all the web and i know what to do. Please could some give a solution???

    Its very very URGENT!!



  • Wednesday, November 04, 2009 3:39 PMPatrice O Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Same thing for me. Look like a new bug. 



    Searching... wondering...