HelloJith Posted July 21, 2010 Posted July 21, 2010 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 Quote
10west Posted July 26, 2010 Posted July 26, 2010 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.