Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Ending a dll program
hello,
I call a DLL from VBA. In this DLL(VB6), the program must stop completely and exit if some condition holds With EXE application, the END statement seems to work for me, but compiling to DLL rejects the END statement. How can I quit the program within the DLL? Thanks a lot Avi |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Ending a dll program
First you should never use the "End" statement, in VBA or VB6. The common
analogy is that's like stopping your car by driving into a brick wall, then leaving your foot on the pedal with the engine running. To get a VB6 dll running, for want of a better term, you will have created an instance of a public entry class in the dll, holding it with a reference in your VBA (unless it's a Com-dll). In your dll, clear down any internal object references (eg module level object variables, running forms, etc), then in your VBA set the reference to Nothing (or allow the reference to go out of scope). Regards, Peter T "avi" wrote in message ... hello, I call a DLL from VBA. In this DLL(VB6), the program must stop completely and exit if some condition holds With EXE application, the END statement seems to work for me, but compiling to DLL rejects the END statement. How can I quit the program within the DLL? Thanks a lot Avi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ending zero | Excel Programming | |||
ending vba | Excel Programming | |||
Ending zero | Excel Discussion (Misc queries) | |||
Ending Sub | Excel Programming | |||
merging excel program with tdc finance program | Excel Programming |