I am trying to create an excel addin which has set of Functions to pull value from the database (I use MS SQL Server). So my query will return only one record set. I use something like below in my vba code.

[Using Excel VBA to run SQL query](https://stackoverflow.com/questions/27385245/using-excel-vba-to-run-sql-query)

But the problem with this is if I have my custom function in 100 cells, the macro makes connection to the DB everytime and retrive data from the DB.

Is there a way where I can make one connection and use that connection to write as many queries as I want?