VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automation type not supported

9 REPLIES 9
Reply
Message 1 of 10
Anonymous
467 Views, 9 Replies

Automation type not supported

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
9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: Anonymous

Is all computers running the same version of Autocad? If you are using other objects, like Office in your DVB, are everyone on the same version. "DaveP" a écrit dans le message de news:40acf736$1_2@newsprd01... > 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 > >
Message 3 of 10
Anonymous
in reply to: Anonymous

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. "Yves" wrote in message news:40acfafa_2@newsprd01... > Is all computers running the same version of Autocad? > > If you are using other objects, like Office in your DVB, are everyone on the > same version. > > > > "DaveP" a écrit dans le message de > news:40acf736$1_2@newsprd01... > > 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 > > > > > >
Message 4 of 10
Anonymous
in reply to: Anonymous

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? "DaveP" a écrit dans le message de news:40acfc1c$1_3@newsprd01... > 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. > > "Yves" wrote in message news:40acfafa_2@newsprd01... > > Is all computers running the same version of Autocad? > > > > If you are using other objects, like Office in your DVB, are everyone on > the > > same version. > > > > > > > > "DaveP" a écrit dans le message de > > news:40acf736$1_2@newsprd01... > > > 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 > > > > > > > > > > > >
Message 5 of 10
Anonymous
in reply to: Anonymous

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. -- Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica (sorry, phony e-mail, SPAM made me do it) "DaveP" wrote in message news:40acf736$1_2@newsprd01... > 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 > >
Message 6 of 10
Anonymous
in reply to: Anonymous

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! "Yves" wrote in message news:40acfd83$1_1@newsprd01... > 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? > > "DaveP" a écrit dans le message de > news:40acfc1c$1_3@newsprd01... > > 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. > > > > "Yves" wrote in message news:40acfafa_2@newsprd01... > > > Is all computers running the same version of Autocad? > > > > > > If you are using other objects, like Office in your DVB, are everyone on > > the > > > same version. > > > > > > > > > > > > "DaveP" a écrit dans le message de > > > news:40acf736$1_2@newsprd01... > > > > 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 > > > > > > > > > > > > > > > > > > > >
Message 7 of 10
Anonymous
in reply to: Anonymous

For what it's worth..... Have you implemented any type of error handling? I don't know if this will work or not but you could try something like Err.Source to help pinpoint the source of the error. -- Matt W There are 3 kinds of people: Those who can count, and those who can't. "DaveP" wrote in message news:40ad0451$1_3@newsprd01... > 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! > > "Yves" wrote in message news:40acfd83$1_1@newsprd01... > > 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? > > > > "DaveP" a écrit dans le message de > > news:40acfc1c$1_3@newsprd01... > > > 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. > > > > > > "Yves" wrote in message news:40acfafa_2@newsprd01... > > > > Is all computers running the same version of Autocad? > > > > > > > > If you are using other objects, like Office in your DVB, are everyone > on > > > the > > > > same version. > > > > > > > > > > > > > > > > "DaveP" a écrit dans le message de > > > > news:40acf736$1_2@newsprd01... > > > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Message 8 of 10
Anonymous
in reply to: Anonymous

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 "DaveP" wrote in message news:40acf736$1_2@newsprd01... > 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 > >
Message 9 of 10
Anonymous
in reply to: Anonymous

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.
Message 10 of 10
Anonymous
in reply to: Anonymous

Easy answer.. (I fell into something similar...)

Try changing all your references to "ThisDrawing.ModelSpace" to "ThisDrawing.Blocks("*MODEL_SPACE")"....


I know its weird, but this fixed alot of those unexplainable errors. try it out....

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost