Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Calling Add-In subroutines from other modules

I have a bunch of common subroutines that I have placed in an Add-In module. This module is available whenever I open Excel, but I cannot reference the subroutines in the Add-In module, from other workbook modules. How is this done?

Steve
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Calling Add-In subroutines from other modules

With your workbook that needs to reference it as the active project,

in the VBE, Tools=References and select the ADDIN

--
Regards,
Tom Ogilvy

"sclark" wrote in message
...
I have a bunch of common subroutines that I have placed in an Add-In

module. This module is available whenever I open Excel, but I cannot
reference the subroutines in the Add-In module, from other workbook modules.
How is this done?

Steve



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Calling Add-In subroutines from other modules

Tom, I do have the add-in, and I can see it in the
project list with any workbook i open. However, if I try
to call a subroutine that is in the Add-In, FROM another
workbook module, it doesn't find the routine. If I copy
that routine into the workbook module I am calling from,
it works fine.

Steve
-----Original Message-----
With your workbook that needs to reference it as the

active project,

in the VBE, Tools=References and select the ADDIN

--
Regards,
Tom Ogilvy

"sclark" wrote in

message
...
I have a bunch of common subroutines that I have placed

in an Add-In
module. This module is available whenever I open Excel,

but I cannot
reference the subroutines in the Add-In module, from

other workbook modules.
How is this done?

Steve



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Calling Add-In subroutines from other modules

I understand and if you create a reference to the addin as I described, then
it will find the routine.

If you don't want to create the reference, then use application.Run see
help for details.

--
Regards,
Tom Ogilvy

"sclark" wrote in message
...
Tom, I do have the add-in, and I can see it in the
project list with any workbook i open. However, if I try
to call a subroutine that is in the Add-In, FROM another
workbook module, it doesn't find the routine. If I copy
that routine into the workbook module I am calling from,
it works fine.

Steve
-----Original Message-----
With your workbook that needs to reference it as the

active project,

in the VBE, Tools=References and select the ADDIN

--
Regards,
Tom Ogilvy

"sclark" wrote in

message
...
I have a bunch of common subroutines that I have placed

in an Add-In
module. This module is available whenever I open Excel,

but I cannot
reference the subroutines in the Add-In module, from

other workbook modules.
How is this done?

Steve



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Calling Add-In subroutines from other modules

Tom, Thanks for the reply. I will try that. I misunderstood, thinking that I had already referenced the module as an Add-In.

Steve


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Calling Add-In subroutines from other modules

Still don't get it. The addin (my custom Add-In) which is visible in the project window for ANY workbook I have open, is not in the list of references, so I cannot select it via Tools/References menu. I can try the application run as well. Any thoughts

Steve
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Calling Add-In subroutines from other modules

Steve,

With the add-in loaded in VBA, go to the Tools menu and choose
VBA Project Properties. In that dialog, give the project a
unique name, like "MyAddInProject" or something. Then, open
workbook which will reference the add-in project. Go to the Tools
menu, choose References, and put a check next to the add-in's
project (not file) name.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"sclark" wrote in message
...
Still don't get it. The addin (my custom Add-In) which is

visible in the project window for ANY workbook I have open, is
not in the list of references, so I cannot select it via
Tools/References menu. I can try the application run as well.
Any thoughts?

Steve



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
turn off subroutines NDBC Excel Discussion (Misc queries) 3 July 27th 09 01:23 PM
Calling Subroutines/User Functions from Macros Neil Strong Excel Programming 2 December 5th 03 11:03 AM
calling modules Pedro Excel Programming 1 November 13th 03 11:15 AM
variable calling in different modules. russell Excel Programming 2 October 24th 03 04:17 AM
Duplicate Subroutines Gary Elsner Excel Programming 8 September 14th 03 08:55 PM


All times are GMT +1. The time now is 02:27 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"