Automation type not supported

Discussion in 'AutoCAD' started by DaveP, May 20, 2004.

  1. DaveP

    DaveP Guest

    I'm getting an error message that reads:

    Compile error:
    Variable uses an Automation type not supported in Visual Basic

    This DVB works on my machine, but not others. I assume I've got an
    additional, or a newer version of some sort of dll or ocx, but how do I tell
    which one? I've looked at the References, and it can find a file for all of
    them. The error message appears as soon as I try to run the DVB Macro. No
    hint as to where the problem is, or which variable uses an Auto...blah,
    blah, blah.

    TIA
     
    DaveP, May 20, 2004
    #1
  2. DaveP

    DaveP Guest

    Yes, we all have the same AutoCAD (2002), but what I'm trying to find out is
    WHICH other objects I need to look at to see if I've got the right version.
    It would be handy if AutoCAD (or probably Microsoft) would at least tell me
    which "Variable uses an Automation type not supported in Visual Basic" so I
    don't have to go slogging through every dll & ocx in my project.
     
    DaveP, May 20, 2004
    #2
  3. DaveP

    Yves Guest

    If in the "non-working" station you don't have a "missing" in the
    references, you should look in the controls in any forms, that might not
    exist in other computers.

    Wait, are you using VB or VBA?

    Can you post a part of that code?
     
    Yves, May 20, 2004
    #3
  4. Well without seeing code is difficult, but unless you reference many dll and
    ocxs
    one simple way would be to deference each one, one by one, and run the
    macro to see when the error clears.
     
    Jorge Jimenez, May 20, 2004
    #4
  5. DaveP

    DaveP Guest

    I'm doing this inside AutoCAD 2002, using VBA.
    I guess I could post my code, but I'd have to stick the entire DVB file up
    here, as well as the LISP code (and several supporting enivronment
    variables) along with it. The code runs fine on my laptop, though. Its
    just that somewhere there's a dll or an ocx that other people have a
    different version of. If you guys (who have been very helpful, thank you)
    don't have the same apps installed, you'd be looking for Referneces that I'm
    not haviong problems with. Its most likely either my DWGThumbnail.ocx or a
    VoloView control. Since there's only one version of the DWGThumbnail, and a
    whole bunch of different versions of the VoloView program floating around,
    it's most likely the VoloView.

    My whole point was, though, why can't VBA just tell you which "Variable uses
    an Automation type not supported in Visual Basic"? It knows where its
    blowing up. Why keep it a secret from me? After all, I created it!
     
    DaveP, May 20, 2004
    #5
  6. DaveP

    Kevin Terry Guest

    you could try a compile first before running (under debug menu), that may
    give you a better indication than just trying to run the code

    Kevin
     
    Kevin Terry, May 20, 2004
    #6
  7. What other controls are you using? Most VBA programmers do not realize that
    they cannot use just any control they find [such as flexgrid, common
    dialog, etc.] Using these controls will pop the error you are receiving.
    Best bet is to try Yves' and Kevin's approaches. Then look at your code and
    comment out ALL error handling EVERYWHERE. Running 'clean' should pinpoint
    the error.
     
    Mike Tuersley, May 21, 2004
    #7
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.