Now, it works fine again in my computer by creating a strong key. and I do the same procedure in the other computers. one of them works fine too. however, the others cannot work. the error "runtime error automation error" occurs. I have installed my DLL the GAC.But there is still the error.
BTW, I have built a simple dll to display helloworld. The same error still occurs in those computer.
e.g Set h = New HelloWorld
I suspect the problem is the varable cannot set to the user defined type. In my computer, the value of h is helloworld. In other computers, the error always occurs in here (setting h to helloworld).
Is the DLL file present on all the computers you're trying to run your code on <--Yes
Think I know whats going on. When you registered the DLL you should have created a type library file, think it's a tlb file although I cannot remember. This file describes to VBA the types, in this case HelloWorld, thats availiable in your managed DLL. The other computers must need this file. If this file wasn't there then VBA on the other computer doesn't know about the types stored in the DLL and it would through an error, especially when you created an instance of that type.
Think you need to register the DLL on every machine also. Try it and see.
I have done all the procedure done in my computer in the other computer. I also try to use late binding.But it still cannot work. I just don't understand why it can work in my computer and one of the other computer while it cannot work in the others.
Try installing your DLL to the GAC, the runtime will find it there. Its very difficult to help you here as I don't know what files you've copied where and/or whether the machines have the correct frameworks installed. The reason this isn't working is maybe due to the runtime enviroments. It's just really tricky helping you out on a forum here.
P.S. it might be worthwhile creating an managed addin for the office application using VSTO.
I follow the intruction you mentioned. It works fine in my computer. But an error occurs in other computer, file or assembly name or one of its dependencies was not found. since I use the serial port provided by vb.net, I would like to know which dll file I sould copy to the other computer. Thank you
Now, in my computer, there is an error when I run the function. "automation error , the system cannot find the file specified". Is there any way to solve it thank you
I'm all out of ideas. I know what it's like having it work on one machine but not on another and it's annoying but I have no idea why. Good luck with it. If you get any more clues post again and I'll see if anything comes to mind.
Think I know whats going on. When you registered the DLL you should have created a type library file, think it's a tlb file although I cannot remember. This file describes to VBA the types, in this case HelloWorld, thats availiable in your managed DLL. The other computers must need this file. If this file wasn't there then VBA on the other computer doesn't know about the types stored in the DLL and it would through an error, especially when you created an instance of that type.
Think you need to register the DLL on every machine also. Try it and see.
using dll file
tschissler
Thank you for your help.
Now, it works fine again in my computer by creating a strong key. and I do the same procedure in the other computers. one of them works fine too. however, the others cannot work. the error "runtime error automation error" occurs. I have installed my DLL the GAC.But there is still the error.
BTW, I have built a simple dll to display helloworld. The same error still occurs in those computer.
e.g Set h = New HelloWorld
I suspect the problem is the varable cannot set to the user defined type. In my computer, the value of h is helloworld. In other computers, the error always occurs in here (setting h to helloworld).
Is the DLL file present on all the computers you're trying to run your code on <--Yes
Thank you again!
Bulldog.NET
Is the DLL file present on all the computers you're trying to run your code on
Anth0ny
I have done all the procedure done in my computer in the other computer.
I also try to use late binding.But it still cannot work. I just don't understand why it can work in my computer and one of the other computer while it cannot work in the others.
GeorgeY
Hi,
Try installing your DLL to the GAC, the runtime will find it there. Its very difficult to help you here as I don't know what files you've copied where and/or whether the machines have the correct frameworks installed. The reason this isn't working is maybe due to the runtime enviroments. It's just really tricky helping you out on a forum here.
P.S. it might be worthwhile creating an managed addin for the office application using VSTO.
zrumchik
Hi,
Thank you very much.
I follow the intruction you mentioned. It works fine in my computer. But an error occurs in other computer, file or assembly name or one of its dependencies was not found. since I use the serial port provided by vb.net, I would like to know which dll file I sould copy to the other computer. Thank you
ljc-ljc
Hi,
I've posted an entry in my blog about this
Calling Managed Code From VBA
Dan Imbrogno
Shaurya
I'm all out of ideas. I know what it's like having it work on one machine but not on another and it's annoying but I have no idea why. Good luck with it. If you get any more clues post again and I'll see if anything comes to mind.
zenzai
Hi,
Think I know whats going on. When you registered the DLL you should have created a type library file, think it's a tlb file although I cannot remember. This file describes to VBA the types, in this case HelloWorld, thats availiable in your managed DLL. The other computers must need this file. If this file wasn't there then VBA on the other computer doesn't know about the types stored in the DLL and it would through an error, especially when you created an instance of that type.
Think you need to register the DLL on every machine also. Try it and see.
Mahesh Gaware
Hi All,
I have a question. what is the cause of the error "File or assembly name, or one of its dependencies, was not found"
Thank you