Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 420
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when adding web reference blair Excel Programming 0 February 27th 06 09:21 PM
Adding a column with reference to another charles Excel Programming 2 October 17th 05 06:44 PM
Adding a Reference in VBA Jim May Excel Discussion (Misc queries) 3 July 26th 05 12:49 PM
Adding to a range in a reference? LilaDuncan New Users to Excel 2 February 7th 05 03:12 PM
Adding a reference under VBA Robin Clay[_2_] Excel Programming 1 October 14th 03 06:01 PM


All times are GMT +1. The time now is 08:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"