Trouble Adding VBA Code to Module; Bug in Excel/VBE?
Hi Ivan, and thanks for your reply!
I'm not entirely sure whether this is applicable or not; when you say "your
procedure", which one are you talking about?
If you are refering to the procedure I'm inserting into a worksheet code
module then I'm not the one who's calling it -- it's the BeforeRightClick
event handler of the worksheet, so Excel calls this handler in whichever way
it feels like.
And the method that calls the Excel objects to create the code is not part
of the XLA file (we've tried to keep the VBA code to a bare minimum, max a
few thousand lines or so). no, the generator is part of a VB6 DLL.
So even though it might somehow be theoretically possible to make the call
via Application.Run, in practice I suppose it would be pretty inconvenient --
and probably pretty risky as well.
But anyway, to recap: Which one of those two methods do you believe should
be called with Application.Run? And by the way: what is the underlying reason
for Excel not being able to re-compile code modules if Call is used rather
than Application.Run?
Cheers,
/MP
"Ivan Raiminius" wrote:
Hi,
I am not sure if this will solve your problem, but try to call your
procedure with "application.run" instead of "call" to let it recompile.
Regards,
Ivan
|