Jump to content

COMPILE ERROR IN HIDDEN MODULE: MAINWIN (macro)


XCrossWindsX

Recommended Posts

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 by XCrossWindsX
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 months later...
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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...