Automation Error System Cannot Find File Specified Vb6
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company automation error the system cannot find the file specified tlb Business Learn more about hiring developers or posting ads with us Stack Overflow Questions ms access automation error. the system cannot find the file specified Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, regasm codebase just like you, helping each other. Join them; it only takes a minute: Sign up Excel .NET COM - Automation error. The system cannot find the file specified up vote 13 down vote favorite 1 I automation error in vba have a .NET 2.0 COM object that's used by VBA in Excel. It works fine on my dev machine, but when trying to use it on a clean VM workstation I get this error: Automation error. The system cannot find the file specified. The dll is registered with "regasm /tlb /codebase mycom.dll" and not put in the GAC. I don't have administration rights on the VM box Any ideas? .net excel com automation share|improve
Regasm Tlb
this question asked May 19 '09 at 9:18 ingt 91124 add a comment| 4 Answers 4 active oldest votes up vote 11 down vote You need to either invoke regasm with the full path to the assembly as the codebase parameter value or put the assembly into some location which is always on the path for searching libraries. Otherwise it will not be found when the client tries to instantiate the COM object. share|improve this answer answered May 19 '09 at 12:09 sharptooth 109k50315704 I did try using regasm on the full path of the assembly which is located in c:\temp, but still the same error –ingt May 19 '09 at 14:07 1 Then I guess your best bet is to start ProcessMonitor - technet.microsoft.com/ru-ru/sysinternals/bb896645.aspx - and look what file exactly is not found. It could be some dependent assembly you're not at all aware of. Once you know for sure it will be much easier to resolve. –sharptooth May 20 '09 at 4:51 sharptooth, thank you very much for this answer. It saved my hide today! –Matthew Talbert Sep 23 '09 at 8:50 THank you this helped alot –David Jan 29 '14 at 14:59 add a comment| up vote 6 down vote On windows 7, 64 bit and a .NET 4.0 framework
SQL Server 2014 Express resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be
Regasm Unregister
auto redirected in 1 second. Ask a question Quick access Forums home Browse forums users FAQ run time error '-2147024894' Search related threads Remove From My Forums Answered by: error -2147024894 (80070002) Automation Error Archived Forums V > Visual Basic Interop and Upgrade Question dependency walker 0 Sign in to vote 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 http://stackoverflow.com/questions/881750/excel-net-com-automation-error-the-system-cannot-find-the-file-specified 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 0 Sign in to vote Hi Dave,  When you ran it as an .exe file did https://social.msdn.microsoft.com/Forums/en-US/7c5c16d7-4029-4b6f-9a29-55a1c27718b5/error-2147024894-80070002-automation-error?forum=vbinterop 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 0 Sign in to vote 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 0 Sign in to vote 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 01, 2007 2:55 PM 0
in VB6 Dev environ If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select http://www.vbforums.com/showthread.php?561154-COM-interop-automation-err-in-VB6-Dev-environ the forum that you want to visit from the selection below. Results 1 to 7 of 7 Thread: COM interop; automation err in VB6 Dev environ Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode https://bytes.com/topic/c-sharp/answers/438152-interop-call Switch to Hybrid Mode Switch to Threaded Mode Mar 10th, 2009,06:34 PM #1 KeyNoteSteve View Profile View Forum Posts Thread Starter New Member Join Date Jan 2008 Posts 6 COM interop; automation err in VB6 Dev environ I have automation error written a vb.net (VS2008) .dll sample. I have built these with the swithes for 'COM Interop'. I move this DLL from my VS2008 machine to my VB6 dev machine; run regasm xxx /tlb; and then write a little sample program to test the DLL. The significant parts of the program program are: ------------------------------------------ << reference is added to the dll>> Public M10 As Mar10Class.Mar10Class Private Sub cmdMar10Class_Click() Set M10 = New Mar10Class.Mar10Class M10.HelloMsg ("Mar10 class Msg from VB6 ") system cannot find End Sub --------------------------------------- If I compile the program, it behaves as expected, but if I try to run it in the dev environment, it gets Automation error The system cannot find the specified file The error happens on line "Set M10 = New Mar10Class....." I have thried this with 4 test dlls. The first one I wrote works in both the comile and dev mod. All others only work in compile mode. I moved one of the test projects to another machine that had the VB6 dev environment and on that machine none worked in the dev environ (and all worked when compiled). I can't see anything in the .net source code or project properties that would make a diference. Can anyone shed some light? Much appreciated. Reply With Quote Mar 10th, 2009,06:54 PM #2 dee-u View Profile View Forum Posts Visit Homepage Software Carpenter Join Date Feb 2005 Location Candon City, Ilocos Sur, Phils. Posts 10,924 Re: COM interop; automation err in VB6 Dev environ It should help to see your .net code for the dll. Regards, ™ As a gesture of gratitude please consider rating helpful posts. c",) Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system Reply With Quote Mar 10th, 2009,07:06 PM #3 KeyNoteSteve View Profile View Forum Posts Thread Starte
tips & solutions from a community of 418,436 IT Pros & Developers. It's quick & easy. Interop call P: n/a Tim I have a vb6 Exe. I need to call a C# dll's methods from the VB Exe. I have used RegAsm to register the C# dll. If the VB6 Exe and the C# dll are in the same folder, then everything is fine. But I want to place them in different folders. When I place the VB6 Exe in a folder called 'A' and the C# dll in a folder called 'B', the VB6 Exe throws the following error when it tries to invoke the c# dll's method. -2147024894 - Automation error. The system cannot find the file specified. What do I have to do to make it work? Dec 22 '05 #1 Post Reply Share this Question 6 Replies P: n/a Vadym Stetsyak Put the asm in the new folder and reregister it. When you register dll, actually you register a COM component ( VB6 sees your dll as a COM ). Registration means that appropriate aliases a placed to the windows registry. You can think of alias as GUID <-> assembly path. -- Vadym Stetsyak aka Vadmyst http://vadmyst.blogspot.com "Tim"