PDA

View Full Version : AutoCAD VBA Upgradation



HelloJith
21st Jul 2010, 06:41 am
Dear Form friends,

I am a very old user of AutoCAD and Visual LISP, but a Novice to VBA.

I had developed a VBA Utility in AutoCAD 2007. When I tried porting it to AutoCAD 2010, I am getting a lot of error messages.

One of which is

"Compiled error" - "User Defined Type Not Defined"

The line on which I am getting this is:

"Private Sub TreeView2_NodeClick(ByVal Node As ComctlLib.Node)"

Another one is

"Compile error" - "Sub or Function not defined"

I am getting this in the line:

"Frame6.Picture = LoadPicture("D:\Design\Logo.bmp")"

Is this because I have missed out on adding some references?

If so, how can I know which reference to add for each new option like treeview, Node etc. that I add to my program

Thank you in advance for your help

Jith, India

10west
26th Jul 2010, 02:44 am
Microsoft common controls library, so you may actually be adding components, also check if a log file is being created with those errors as the project loads
, you may just search the MSDN knowledge base for specific controls, and what component libraries they are within, in VBA the IDE may differ a little from standard VB, check the VBA version running as well, sometimes newer components try loading in an older IDE.

Remember to check not only references, but also the Components you may need to add to a development environ. The Microsot is a good source for support of various ActiveX controls distributed in VB/VBA, and a search engine can also turn up other information from specific error messages or numbers, which sometimes share commonalities across VBA IDE's running in Excel, or Word and others.

Check syntax also, sometimes parenthesis and other slight alterations are caught on one load, but not another, and on varied machines

Be careful to not to save an error loaded project, or saveas till it's troubleshot , since sometimes a picturebox is placed as a control holder for a missing control.