Hi,
I am new to Excel VBA.I have a requirement where i should add the References to a VBA Project programmatically.
Is that possible do it using code?
Regards,
Krrishna
Hi,
I am new to Excel VBA.I have a requirement where i should add the References to a VBA Project programmatically.
Is that possible do it using code?
Regards,
Krrishna
It's possible. Check out these 2 articles in the KB:
Adding a reference
http://vbaexpress.com/kb/getarticle.php?kb_id=267
How to identify a reference
http://vbaexpress.com/kb/getarticle.php?kb_id=278
I found them to be of great help when I had the same problem as you previously.
Hi,
when i run the above code its throwing a runtime error "can't break continue mode".
How can we rectify this?I have used the same code you have given to me.
Regards,
Krrishna
You cannot step through the code and you will probably need Microsoft Extensibility Library reference setting and usually you need to have trusted access to the vba project.
Regards,
Simon
Please read this before cross posting!
In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
If I have seen further it is by standing on the shoulders of giants.
Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)