accessing the calling vba project

Discussion in 'AutoCAD' started by Mark Dubbelaar, Mar 16, 2005.

  1. hi

    i have a dll file with my common forms and functions created in vb6. one of
    the forms is one that allows the user to select multiple drawings to batch
    (to do whatever i want it to do, in one case a routine updates an specified
    attribute in a block). these forms and functions are accessed from a
    routines in autocad.
    this multiple select form has a next button on it, and when clicked hides
    the form and then my code from autocad displays a non common dialog (ie the
    dialog appropriate to the routine).
    On this dialog is a button to start the function (the function is within a
    module in the vba routine in autocad) that actually does something (ie
    updates the blocks).
    after all this, i have a sub in the common functions (vb6) which batch
    process all the drawings given some parameters and a macro to run... this is
    where the problem is... originally i had the batch dialog and batch sub
    process in a vba routine inside autocad, but decided to ship it to a dll
    file. And once i've done that, the dll file can no longer find or access the
    macro which i send to it, i get the error, 'Failed to run VBA macro'

    so.... is it possible to access a sub/function from an external dll file,
    that is within the current vba project which has called the dll file to
    begin with

    any help would be great...

    cheers

    mark
     
    Mark Dubbelaar, Mar 16, 2005
    #1
  2. I'm certainly no expert, but have you checked that the required
    functions/subs have a public scope now that you've moved them outside the
    project?

    Also, what dialog are you using to build a list of paths/filenames to batch
    process? I was considering working on a similar tool but I wasn't above to
    find the required controls.

    -Chris
     
    Chris Shoemaker, Mar 16, 2005
    #2
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.