I have a vaild VBA Application that works fine when run from the VB Editior. Now I am trying to use lisp to define a command to run the VBA Applicaiton. I have sucessfully done this. My probelm is that if I run the Lisp command IN THE DEFUALT DRAWING THE FIRST TIME AUTOCAD IS LOADED I get a Run-Time Errror 53 File Not Found. If I hit END and run the lisp command again it works fine. What is really strange is that it only happens in the first drawing when AUtoCAD is first loaded. All drawings after that work fine. Here is my lisp code to call the VBA Application. ;;; Load OCS TAG Program Macro for Events (princ "\n\tLoading OCSD Tags...") (vl-vbaload "I:\\ACAD\\PROJ\\P2-80\\PDR\\DATA\\OCSD_TAGS.dvb") (princ "Load Complete.\n") ;;; define the OCS Tagging Program Command Name (defun cts () (princ "\nOCSD Tagging System <<Version 2004-R1>> - (C) 2004, Malcolm Pirnie Inc.\n") ; print message to screen (vl-vbarun "I:\ACAD\PROJ\P2-80\PDR\DATA\OCSD_TAGS.dvb!Module1.OTAGTAB") (princ) ) Again I only get the Run-Time Error 53 in the first drawing when AutoCAD loads. After that all works fine. Any Ideas would be greatly appreciated. Thanks!
(vl-vbarun "I:\ACAD\PROJ\P2-80\PDR\DATA\OCSD_TAGS.dvb!Module1.OTAGTAB") You need two slashes in strings: "I:\\ACAD\\PROJ\\P2-80\\PDR....."
Thanks for the input. Unfortunately it did NOT work. Again my problem only occurs in the first drawing when AutoCAD has just been loaded. After that it loads and runs fine.
Thanks! I was getting the path to my new app from the VBE Current Project property. The first time the new app was run it was defaulting to the folder where my ACAD.DVB was located. I was able to fix it by unloading ACAD.DVB.