VBA: adding a reference to Microsoft VBA Extensibility

VBA: adding a reference to Microsoft VBA Extensibility

itUMLAN
Explorer Explorer
3,481 Views
4 Replies
Message 1 of 5

VBA: adding a reference to Microsoft VBA Extensibility

itUMLAN
Explorer
Explorer

I want to compare the actual source code of two .ivb files. Since they are binary, What should do the trick is exporting all files in my .ivb: https://stackoverflow.com/questions/39293881/code-compare-for-vba-source-code

 

However, it says to "add a reference to Microsoft Visual Basic for Applications Extensibility 5.3."

 

How do I do this exaclty?

 

the closest thing I've come to find is this for Excel: http://www.exceltoolset.com/setting-a-reference-to-the-vba-extensibility-library-by-code/

but it doesn't seem to be working for Inventor.

0 Likes
Accepted solutions (2)
3,482 Views
4 Replies
Replies (4)
Message 2 of 5

udo.huebner
Autodesk Support
Autodesk Support
Accepted solution

You want to know how to exactly add a reference to "Microsoft Visual Basic for Applications Extensibility 5.3" ?

1. Start Inventor and then start VBA Environment using ALT+11

2. Add Reference

IV2021-VBAAddReference.png

 

By the way, the linked code from https://stackoverflow.com/questions/39293881/code-compare-for-vba-source-code is intended to use with AutoCAD

0 Likes
Message 3 of 5

udo.huebner
Autodesk Support
Autodesk Support
Accepted solution

If you change 

Set vbe = ThisDrawing.Application.vbe

to

Set vbe = ThisApplication.vbe

in Inventor, the linked code above works as expected. 

0 Likes
Message 4 of 5

Jon.Dean
Alumni
Alumni

Hi @itUMLAN ,

This forum thread was escalated to Autodesk Technical Support but I see Udo has answered your question in the forum.

Do you need further help or did Udo's answer to you, help you resolve this issue?

Cheers

Jon.



Jon Dean

0 Likes
Message 5 of 5

itUMLAN
Explorer
Explorer

@Jon.Dean I misclicked on the support button, and I could not undo it. Thank you for checking it.

 

@udo.huebnerthank you for the solution ! It works. Brillliant, we have been looking for this for a long time.