G
Guest
From a sub routine in one workbook I want to call a public method that exists in a public subroutine within another workbook
The problem is that I don't want the user to have to manually add a reference to the called workbook before being able to make the call
The only way I have found to call from one workbook to another is to first select the called workbook in the VBA references dialog. Once manually referenced I can do something like workbook_with_manual_reference.the_public_method()
I am finding this is the case even when the called method exists within a workbook that is loaded as an add-in. Oddly enough, application events that are trapped within the add-in code get called regardless of whether the add-in is referenced or not
Is it possible to automatically create (late-bind) references to loaded workbooks? How do you do it? If it is possible then how do you late bind the called method such that the compiler does not complain about the missing reference while the dynamic reference is being created
Thank
Mark
The problem is that I don't want the user to have to manually add a reference to the called workbook before being able to make the call
The only way I have found to call from one workbook to another is to first select the called workbook in the VBA references dialog. Once manually referenced I can do something like workbook_with_manual_reference.the_public_method()
I am finding this is the case even when the called method exists within a workbook that is loaded as an add-in. Oddly enough, application events that are trapped within the add-in code get called regardless of whether the add-in is referenced or not
Is it possible to automatically create (late-bind) references to loaded workbooks? How do you do it? If it is possible then how do you late bind the called method such that the compiler does not complain about the missing reference while the dynamic reference is being created
Thank
Mark