Olhado_ Posted February 2, 2009 Posted February 2, 2009 I have a VBA program that runs a LISP file, just fine, from "vbarun". However, I am trying to create another LISP file that loads the VBA program. Well, I can get that just fine. The problem is it all works, except when the LISP file called by the VBA code runs into my error trap, which exits the LISP file. The program does not continue, as it would if I ran the program using "vbarun". I believe it is because the exit statement, exits out of LISP, which exits out of my first program. Is there a way around this? Is there a LISP statement that just exits out of a LISP function? In other words, the steps are the following: 1. Run LISP_A 2. LISP_A loads LISP_B and loads/runs VBA_A 3. VBA_A calls LISP_B - If LISP_B runs into an Error an exit statement (in LISP_B) is called and the whole program crashes. Thanks, Chris Quote
ASMI Posted February 2, 2009 Posted February 2, 2009 Hmm... It isn't good way. VBA and AutoLISP programs work asynchronous, each in own namespace. Why is such a bizarre scenario? I am confident that everything can be solved more easily using only one programming environment, LISP or VBA. Of course run VBA with lisp is normal but run lisp with VBA isn't. Quote
Olhado_ Posted February 2, 2009 Author Posted February 2, 2009 Thanks for the reply. And from your response I may have to ask everyone to load "LISP_B" into their startup suite, which is what I did when I was testing the VBA program. I was just hoping there was another way. Quote
wizman Posted February 2, 2009 Posted February 2, 2009 may be? (if (vl-catch-all-error-p (vl-catch-all-apply '(lambda () (exit) ) ) ) ...load vba_a... ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.