I want to add a vba function to personal.xlsb, but this function has an ADODB.Connection object in it.
I can resolve that by (in the VBA editor) selecting tools -> references and then checking the box "Microsoft ActiveX Data Objects 6.0 Library"
My question is, how do I make "Microsoft ActiveX Data Objects 6.0 Library" one of my default references so that it is always available whenever I start up excel?
Here is an alternate method. Could be added as a button or an on open command. Not too clean but gets the job done with minimal code:
While Siddharth's solution is very handy, I thought I would offer these functions from a tool I rolled out where we were constantly getting calls that related to the fact the user didn't have the proper references checked in the VBE in their Excel version, for many possible reasons.
Just throwing it out as an option and something to look it. There are some very project specific features in it, but you could modify it to work with your needs probably pretty easily.
This function will print your reference information to help you find the dll for it, but the reference has to be checked for it to print it.