DLL Vs. EXE?
Roedd <<avi wedi ysgrifennu:
Hello,
What are the main differences between an EXE or DLL written in Vb6 and
what considerations for choosing one of them when writting a piece of
code to be used with VBA?
OK, assuming you mean an ActiveX .exe, the advantage of this is that you can
have it independently threaded to your VBA. Just code some events to alert
your VBA when processes are finished, declare the instance of your .exe
withevents and you can have it go off and do lengthy stuff without any
danger of the user thinking that Excel has hung. The disadvantage is that
all of this takes place outside of the Excel process, which means that
communication between Excel and your .exe will be slow because it must be
marshalled through a narrow communication channel.
So, if you want to do a lot of interaction between your COM server and
Excel/VBA, use a dll.
HTH
Rob
|