Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error when adding web reference | Excel Programming | |||
Adding a column with reference to another | Excel Programming | |||
Adding a Reference in VBA | Excel Discussion (Misc queries) | |||
Adding to a range in a reference? | New Users to Excel | |||
Adding a reference under VBA | Excel Programming |