I have an add-in that has a formula that uses a named range on one of it's sheets to lookup values needed to complete the calculation. My question is how do I in the formula located in the Add-in reference the sheet in the Add-in and not the ActiveWorkbook:
Snippet of my code in the add-in:
---------------------------------
' Location for Exact Mass data
Set wsSheet = ThisWorkbook.Sheets("Mass_Table")
---------------------------------
need this to be something like:
---------------------------------
' Location for Exact Mass data
Set wsSheet = ThisAddIn.Sheets("Mass_Table")
---------------------------------
I would like to use this calculation in other sheets but each time I do, it will not work because there is no "Mass_Table" sheet in the workbook I am trying to user the UDF in, it is located in the Add-in only.
Hope this makes sense. Any help would be appreciated.
Snippet of my code in the add-in:
---------------------------------
' Location for Exact Mass data
Set wsSheet = ThisWorkbook.Sheets("Mass_Table")
---------------------------------
need this to be something like:
---------------------------------
' Location for Exact Mass data
Set wsSheet = ThisAddIn.Sheets("Mass_Table")
---------------------------------
I would like to use this calculation in other sheets but each time I do, it will not work because there is no "Mass_Table" sheet in the workbook I am trying to user the UDF in, it is located in the Add-in only.
Hope this makes sense. Any help would be appreciated.