Problem adding a reference
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? -- Travis Crow |
Problem adding a reference
Sorry, if it's too simplistic but where do you save it - Excle or VBE?
On Mar 31, 3:29*pm, 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? -- Travis Crow |
Problem adding a reference
On Thu, 31 Mar 2011 07:33:23 -0700, AB wrote:
Sorry, if it's too simplistic but where do you save it - Excle or VBE? I've tried from both. Even just closed and had Excel prompt to save as well. -- Travis Crow |
Problem adding a reference
On Thu, 31 Mar 2011 14:29:45 +0000, Travis Crow wrote:
How can I get the reference to stick once set? NM found the problem. If I have a function that references the referenced template code, e.g. something=ordercode.function() then it sticks, so I just need some VBA in the other template to do that. -- Travis Crow |
Problem adding a reference
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 |
All times are GMT +1. The time now is 08:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com