I have a macro in an addin that I am calling from a separate workbook. However, whenever I run the code below, it is running the code in the addin, not the active workbook.

Sheet1.Range("A2").CopyFromRecordset rsData

Sheet1 doesn't exist in the addin, so it is failing. How can I get the code to work in the ActiveWorkbbok, and not in the addin?

Thanks