Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ending zero george m Excel Programming 1 February 26th 08 08:32 PM
ending vba Arnold Klapheck Excel Programming 4 August 29th 06 08:15 PM
Ending zero RAB Excel Discussion (Misc queries) 3 August 25th 05 06:09 PM
Ending Sub Paul Excel Programming 3 October 1st 04 07:48 PM
merging excel program with tdc finance program judy Excel Programming 0 November 5th 03 08:01 PM


All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"