The template file is used to create other files.
So how would you create a reference to any of those files that was created using
that template -- in fact, you could have no open files that used that template
-- or lots and lots of open files that used that template.
Which would would the reference point to?
You may want to consider moving the code that should be shared to a new workbook
-- an addin (*.xlam).
Then each workbook could use a reference to that addin.
Or you could open it (if it's not already open) and run the code using
application.run
Check out Ron de Bruin's site for more information:
http://www.rondebruin.nl/applicationrun.htm
On 03/31/2011 09:29, Travis Crow wrote:
I have a template (ordercode.xltm) with some VBA functions in it.
I've added this as a reference to other templates in the past with no
problem but now if I open a new template and add the reference to
ordercode.xltm (VBA Window: Tools-References) it adds OK but after
saving, closing and re-opening the template, the reference no longer
exists.
How can I get the reference to stick once set?
--
Dave Peterson