muck Posted February 9, 2014 Share Posted February 9, 2014 (edited) In the past I have had trouble with my VBA routines working on 64 bit AutoCAD 2012 & 2013. I had all kinds of problems. Now I am on a machine that has AutoCAD 2014 on it. To my surprise I noticed that one of my VBA routines that failed on AutoCAD 2012 and 2013 is working on AutoCAD 2014. The machine that has AutoCAD 2014 on it is a Windows 7 64 bit machine but I don't know if AutoCAD 2014 is 64 bit or not. Is there a way to tell if I am using AutoCAD 2014 64 bit? Maybe AutoCAD was installed in compatable mode and it is not really 64 bit. Maybe AutoDesk made fixes to 64 bit AutoCAD 2014 VBA. I need to know why my VBA routine is working on the AutoCAD 2014 machine and not with my AutoCAD 2013 machine. Maybe there is a way to fix the 2013 machine to allow VBA routines to work properly. Can anyone help? Thank you, Edited February 10, 2014 by muck Quote Link to comment Share on other sites More sharing options...
Tyke Posted February 9, 2014 Share Posted February 9, 2014 In AutoCAD 2012 and 2013 the VBA engine is the 32 bit VB6.3 and in AutoCAD 2014 it is the 64 bit VB7 engine. 32 bit controls used in VB6 will not work in VB7. For the VBA routines that are not working in VB6 try opening the module in VBAIDE and check the references, if there are any marked "MISSING..." then remove the tick from the box and try running it again. Alternatively post your code here so we can have a look at it. Quote Link to comment Share on other sites More sharing options...
muck Posted February 10, 2014 Author Share Posted February 10, 2014 Here is a snap shot of my VBA References for AutoCAD 2013 and there is only 3 boxes checked. It does not work. I have almost given up on using VBA on it. I do will look at the 2014 machine and give you a snap shot of it at a later time. Quote Link to comment Share on other sites More sharing options...
Tyke Posted February 10, 2014 Share Posted February 10, 2014 In your VBAIDE you do not have any project loaded and hence you will only get the three boxes you showed. If you load a project and then check your references you will get extra boxes checked. The following screen shot shows the references for a forms application in AutoCAD 2013, note that it references the 'AutoCAD 2012 Type Library' even though it is 2013. The 'Microsoft Forms 2.0 Object Library' reference is automatically inserted as soon as you insert a form into your project. The 'Microsoft Common Dialog Control 6.0 (SP6)' reference is automatically inserted when you place a common dialog control onto your form, note that this is a 32 bit control and not available the 64 bit VB7 VBA engine used in 2014. Ignore the fact that the dialog is in German, I don't have an English version of 2013 to show you. There isn't a Language Pack for Civil 3D 2013 and earlier, just for vanilla AutoCAD. Quote Link to comment Share on other sites More sharing options...
muck Posted February 10, 2014 Author Share Posted February 10, 2014 Ok here is my ref snap shot on the 2013 AutoCAD. I cannot enter text into the text boxes with my routine. Remember that this same routine worked on 2014 AutoCAD and other autoCAD versions below 2012. Quote Link to comment Share on other sites More sharing options...
Tyke Posted February 10, 2014 Share Posted February 10, 2014 Your Type Library is at the bottom of your list, increase it's priority using the up arrow in the dialog. You can only move it up to position 2, 'Visual Basic for Applications' is in position 1 by default. See if that changes any thing. Quote Link to comment Share on other sites More sharing options...
muck Posted February 10, 2014 Author Share Posted February 10, 2014 Well, I changed priority but the AutoCAD and VBA seems to run slow with some key response lags that makes the system appear to lockup at times. Quote Link to comment Share on other sites More sharing options...
muck Posted February 10, 2014 Author Share Posted February 10, 2014 I will have to take that back. I still can't use my textboxes in my vba routines. Quote Link to comment Share on other sites More sharing options...
muck Posted February 10, 2014 Author Share Posted February 10, 2014 Here is a snap shot of my references revised. Quote Link to comment Share on other sites More sharing options...
Tyke Posted February 10, 2014 Share Posted February 10, 2014 I've sent you a PM Quote Link to comment Share on other sites More sharing options...
muck Posted February 11, 2014 Author Share Posted February 11, 2014 Tyke, The 2014 machine VBA is 7.1 and my routine it appears to to do fine on it. Note I have only ran the routine a few times for testing but it appears to be working on 2014. I don't know why is it not working on 2013 & 2012 machines Thank you, Quote Link to comment Share on other sites More sharing options...
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.