locked
error -2147024894 (80070002) Automation Error

    Question

  • 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.

    Wednesday, August 29, 2007 3:09 AM

Answers

  • 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

    Friday, August 31, 2007 9:33 PM
    Moderator

All replies

  • 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

    Friday, August 31, 2007 9:33 PM
    Moderator
  • 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.
    Saturday, September 1, 2007 2:55 PM
  • 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 4, 2007 5:14 PM
  • 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 4, 2007 10:55 PM
  • I fixed the problem 2 hours ago... You need my help??? 

    Tuesday, September 4, 2007 11:03 PM
  • Paolo87, maybe you can share your solution with us?

     

    Tuesday, November 13, 2007 8:54 PM
  • 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

     

     

    Wednesday, December 5, 2007 8:29 PM
  • 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

     

     

     

    Thursday, February 21, 2008 6:44 PM
  • Hey i am having same problem, please tell me the solution...its very urgent..thanks in advance, Asheesh

    Tuesday, April 22, 2008 6:30 PM
  • 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.
    Tuesday, April 22, 2008 10:40 PM
  • 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

    • Proposed as answer by Malar Wednesday, February 17, 2010 1:11 AM
    Friday, November 28, 2008 10:12 AM
  • 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
    Monday, September 14, 2009 1:03 PM
  • 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 4, 2009 12:52 PM
  • Same thing for me. Look like a new bug. 



    Searching... wondering...
    Wednesday, November 4, 2009 3:39 PM
  • Here is the solution!!

    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

    Codebase option is the key ..

    later,

    Sath

    Monday, May 24, 2010 6:04 PM
  • Sath,

     

    Thank you kindly.  The Codebase option was what I too was missing.  Thanks kindly.

     

    Peace,
    James Rose
    New York, NY

    • Proposed as answer by KaRV007 Monday, May 7, 2012 1:06 PM
    • Unproposed as answer by KaRV007 Monday, May 7, 2012 1:06 PM
    Monday, September 27, 2010 3:12 PM
  • Hi,

    I have tried the suggested /codebase option and have received the following message...

    RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it.
    Types registered successfully

    After this when I try to run my program, I still get the runtime error "error -2147024894 (80070002) Automation Error The system cannot find the file specified " ....

    after the registration, the library dint appear automatically in the tools>>references, so i have referenced it manually by browsing for the .tlb

    how was it in your case(s)? Did the library appear automatically or did u do it manually?

    Code Snippet: (i get the error at the bold line)

    Sub Abc()

    Dim A123 As mydll.coverfcn

    Set A123= New mydll.coverfcn

    Regards,

    Karthik

    Monday, May 7, 2012 1:06 PM