Reference a Defined Name in VBA in an Excel AddIn
Posted on 2015-01-08
I have added a Defined Name called "ConnectionString" on "Sheet1" in an Excel AddIn I have written. What is the proper way to reference that Defined Name within the VBA of the AddIn itself?
ActiveWorkbook.Range("ConnectionString").Value and ThisWorkBook.Range("ConnectionString").Value
are not correct because they will look for the defined name in the file the user is working with and not the AddIn workbook. I want to reference the name inside the VBA of the AddIn.