ragingradish
07-03-2008, 10:02 AM
Howdy everyone, I've got a bit of a problem.
I've created a couple of Functions which are saved in a .xla file that gets loaded as Excel starts. So far so good. What the function does is gets the Path of the ActiveWorkbook and then opens another file (belonging to an application called Caseware) in order to retrieve data from it. It works well, except for one thing:
If 2 or more workbooks are open and they have different filepaths, the function will also execute in the Excel workbook that is NOT active and return incorrect information to that inactive workbook.
So my question is this: Is there a way to have these functions run only in the active workbook and ignore any other open workbooks?
Using Excel 2003, SP3 on Windows XP
I've created a couple of Functions which are saved in a .xla file that gets loaded as Excel starts. So far so good. What the function does is gets the Path of the ActiveWorkbook and then opens another file (belonging to an application called Caseware) in order to retrieve data from it. It works well, except for one thing:
If 2 or more workbooks are open and they have different filepaths, the function will also execute in the Excel workbook that is NOT active and return incorrect information to that inactive workbook.
So my question is this: Is there a way to have these functions run only in the active workbook and ignore any other open workbooks?
Using Excel 2003, SP3 on Windows XP