XCrossWindsX Posted February 2, 2012 Share Posted February 2, 2012 (edited) Hello, A macro was written (.dvb) for changing our company title blocks and block data. It seems to work perfectly on the Windows 7 (Autocad 2011) computer it was written on but when trying to run it on our older XP (Autocad 2011) computers or other Windows 7 computers we get the following error: (COMPILE ERROR IN HIDDEN MODULE: MAINWIN). This happens at the point in which It is suppose to compile the list of files contained within the folder it (in the field box) it is directed too. That particular piece of code, the part that compiles the list of file names in the directory, places it into a list that you can pick and choose which files are to be manipulated, was copied from a working batch plot macro and it works fine in that plot program on all version of windows and autocad. Has anyone got any ideas as to what may be going on here or what I may be looking for ? Edited February 2, 2012 by XCrossWindsX Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 3, 2012 Share Posted February 3, 2012 Can you open it in VBAman if so export it out and recreate on the computer it doesn't work on re save as say ver 2 you may need to find lowest common denominator. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted February 3, 2012 Share Posted February 3, 2012 I'm no VBA expert, but I believe that one must compile a different version for each 32-Bit and 64-Bit environments (as Al has suggested). HTH Quote Link to comment Share on other sites More sharing options...
EFL Posted May 10, 2012 Share Posted May 10, 2012 Can you open it in VBAman if so export it out and recreate on the computer it doesn't work on re save as say ver 2 you may need to find lowest common denominator. If it's true that you can see the code in the vbaeditor, follow the next: In the "Project Explorer" you rightclick on a module and choose "Export file..." and save it, do this for each of the modules, forms and classes. Then you go to acad, click in the menu "Tools -> macro -> VBA manager". Here you click on the "New" button. As you can see there is a new project "ACADPoject". At the bottom of this window you find the button "Visual Basic Editor" Now as you did with exporting all this, you have to import all at the same way: Rightclick and then "Import file..." For "Thisdrawing", you saved it as a class, when you import this one it wil be a classmodule ->> copy all code and paste it in the Thisdrawing (doubleclick it). I hope this wil help you. Let us know if it is. 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.