-
I have a block of code that I use alot. I'm looking for a way to access the block of code without retyping it. I've tried to compile it into a DLL, but get an error (can not find entery piont to dll) when i try to access it. If you have any ideas please help me out.
Thank you
-
Post the code
No idea without seeing what you are trying to achieve, do you have properties etc defined for the dll
-
If its a collection of code in a Module, Public Functions and the like, why not save it off as a Module and include it in any Projects that might use it.
-
Not too hard
Just go to http://www.chez.com/scribe
there is a very small sample About making DLLs. It's very easy. And it WORKS!
-
Complete URL
-
Well ....
Yes, Steven has put it almost right.
Almost, because you still can make a dll from it. Start a new ActiveX dll project, add your code modules to it and compile it into a dll file. I think the URLs have given you that stuff.
The advantage of a dll over a re-usable code module is a matter of discussion. But essentially you can distribute a dll easily, not a code module. For e.g. if you want to access the same code in more than one project and if it is in a code module, keeping it up to date will be difficult. With a dll, you can improve the functionality and distribute the latest version without much trouble.
-
If the code is going to be shared throughout different Application's, it's a good idea to make it into a DLL. However, if it's just some common code you use in all of your App's (Registry API's for example) then you can put it into a module and store it in the modules' template directory. That way, when you waant to add a new module to your App, you can select your "common" module because it contains all of your common code.
-
Well ....
Thanks Megatron. You have put it just right. The idea of putting the module in the Templates folder is also nice. I use this in case of my Word files, but never thought of using it for VB.