Help with lisp related to VBA

Discussion in 'AutoCAD' started by Ron Mills, Jun 16, 2004.

  1. Ron Mills

    Ron Mills Guest

    I have three vba apps that I'm loading with a lsp routine

    An example of one of the routines follows:

    (defun c:ll()
    (vl-cmdf"-vbarun" "LabelLeader.dvb!leader.leaderdraw")
    (vl-cmdf"vbaunload" "LabelLeader.dvb")
    (princ)
    )

    for some reason, two of the vba macros fail to unload after executing, both
    of these have code only in the module. No user forms or calls outside of
    the module.

    The third one unloads exactly as desired, but that does have user forms.

    Is there some reason why just having all code in the module would prevent
    the macro from unloading when given the vbaunload command?
     
    Ron Mills, Jun 16, 2004
    #1
  2. Ron Mills

    Tim Riley Guest

    Make sure you sell all objects to Nothing. Otherwise it will fail to unload.

    You could also try ' Application.UnloadDVB "c:\Path\to\LabelLeader.dvb" '
    at the end of the leaderdraw sub.

    Tim Riley
     
    Tim Riley, Jun 17, 2004
    #2
  3. Ron Mills

    Ron Mills Guest

    thank you.. that worked wonderfully, I never thought of doing in that
    manner.
     
    Ron Mills, Jun 18, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.