VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatically load files from References Dialog Box

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
482 Views, 2 Replies

Automatically load files from References Dialog Box

Hello 🙂

I wrote a program that use several dll files. On my computer it works but
when i use it on different PC, these files are missing or are in different places
and the program don`t load them automatically so the user need to load them from
Tools/References. These are the files that program use:

VBE6.dll
acax16enu.tlb
stldole2.tlb
EXCEL.EXE
FM20.dll
COMDLG32.OCX
LandAuto46.tlb

The question is - is there a way to load these files automatically with function. If i
paste the files in the same directory with .DVB file, is there a way to load them automatically?


2 REPLIES 2
Message 2 of 3
norman.yuan
in reply to: Anonymous

Almost all files you listed (Landauto46.tlb, I do not know what it is from) cannot be simply copied to another computer and use with your code: they are part of other software/application. You need to install coorect version of that software/application in order for your code work.

 

For exaple, Excel.exe is the main program of MS Excel. You cannot run it without install Excel, the whole thing. acax16enu.tlb is presented in a computer due to the installation of AutoCAD. You DO not want to copy one from your computer to replace the one in the other computer: if the 2 files from different version of AutoCAD, you screw the AutoCAD in the other computer. On the other hand, if the other computer does not have AutoCAD installed, there is no use the copy it to other computer.

In your case, you need to make sure the other computer has proper software/application installed, which should be the same versions as your code uses in your computer, or, in most times, newer versions. If your code uses newer versions of apps, such as AutoCAD/Excel, than other computers, the changes are your code would not work on other computers (you would see missing references in VBA IDE).

 

There are more things to know on this regard, but there is no point to copy the files you listed to other computers in order for your code to work.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 3
Anonymous
in reply to: norman.yuan

Thank you for replay.

Actually i dont now what is the problem when i start my programs on different PC :). I check the version of Operating system, AutoCAD, some other softwares and everything is ok (same versions like mine). But functions like VB.Format() not work. Maybe i miss something but i can not understand what it is. Never mind i will continue trying.

 

Something else, if i want to load custom dll file that i wrote is there a function to do that?

 

PP Landauto46.tlb is from Autodesk Land Desktop type library

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost