The AddFromFile method creates a reference to a type library in a specified file.
Syntax
Set object = References.AddFromFile(filename)
The AddFromFile method has the following arguments.
| Argument | Description |
|---|---|
| object | A Reference object. |
| filename | A string expression that evaluates to the full path and file name of the file containing the type library to which you wish to set a reference. |
Remarks
The following table lists types of files that commonly contain type libraries.
| File extension | Type of file |
|---|---|
| .olb, .tlb | Type library file |
| .mdb, .mda, .mde | Database |
| .exe, .dll | Executable file |
| .ocx | ActiveX control |