Hi Michel,
I think its worse than that: using End not only kills your VBA variables, it
kills everyone else's object variables as well, including all Application
level events.
So many other Excel addins that have been loaded will probably crash.
So I suspect the only solution is to replace all the END statements.
Charles
______________________
Decision Models
The Excel Calculation Site
www.DecisionModels.com
"Michel Kemper" wrote in message
. ..
Hi,
We intend to use FlexLM as out licensing system 'behind' Excel-VBA. FlexLM
is basically a bunch of dll's and a number of API calls.
The thing is that in my VBA code left, right and centre I use the "End"
statement (Yes, I know it is bad programming style - but it is kind of
inherited). The problem is that this End statement not only clears all the
VBA variables, but it seems to clear the FlexLM memory also!! Basically
if,
upon closing my workbook, I pass the license key back to the dll (this
license key I temporarily store in a workbook name, so is *not* cleared by
the End statement), the dll falls over if an End statement has been
executed, whereas it happily accepts the license key if End is not
executed.
Is there any way around this? (other then going through tens of thousands
of
lines of code to get rid of the End statement). For instance, is there a
way
to stop Excel execution without clearing the workspace (incidentally,
"Stop"
doesn't do the job of course). Or is there a way of loading the FlexLM
dll's
in such a way that they are unaffected by the End statement. Or maybe you
have anoather idea?
Look forward to your reply.
Cheers - Michel Kemper - London