On Jan 25, 1:10*pm, "Bill Martin" <martin_spamt...@verizon.net> wrote:
> Well, the simple way is to open the codeless workbook's VBA module and click
> on "Tools/References" at the top. *Then select the name of the book withthe
> code and check it's box. *At that point everything in the second book is
> available to the first. *However it will also automatically open the second
> book whenever you open the first if that's a problem.
>
> Once you've checked the box as above, then you just use the subroutine name
> in the first book same as if the routine lived in the first book.
>
> Bill
> -------------------------"Coby" <coby.giff...@selectbuild.com> wrote in message
>
> news:c9628d4e-367b-41ca-9b2d-(E-Mail Removed)...
>
>
>
> > If I had one workbook open, but the vba modules were in another
> > workbook which is closed, does anyone know if there is a way for the
> > codeless workbook to run the subroutine which is in the other
> > workbook?
>
> > Any help is sincerely appreciated.
>
> > Coby.- Hide quoted text -
>
> - Show quoted text -
Having both workbooks open is not really a problem in the case of my
situation.
I would like to make the call to the sub routine completely via code,
however.
With both workbooks open I kept trying to do Call XYZ_SubRoutine, but
since the module exists in the other workbook I get the compile
error. Perhaps, there is a different way to initiate a sub routine?
Or, I may be able to somehow use the method you suggested, but through
code instead of the user?
Thanks for your input . . . I may have a new approach to try.
|