Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How Do I Run Subroutines in .xla files from VBA Code in Spreadshee

I created an add-in (.xla extension) from a spreadsheet with quite a bit of
code. I have installed the add-in, and can see it from the Tools- Add-ins
dialog box. It also appears in the VBE Project Map.

However, I can not access the code except by associating it with a button or
command menu. When I try to access it in code, I get a "Subroutine not
defined" type of message.

Am I doing something wrong, or is the only way to access the code via a menu
command or button?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 301
Default How Do I Run Subroutines in .xla files from VBA Code in Spreadshee

Try in the VBE making a reference via tools/references, and checking the
xla.

"John Loo" wrote in message
...
I created an add-in (.xla extension) from a spreadsheet with quite a bit of
code. I have installed the add-in, and can see it from the Tools- Add-ins
dialog box. It also appears in the VBE Project Map.

However, I can not access the code except by associating it with a button
or
command menu. When I try to access it in code, I get a "Subroutine not
defined" type of message.

Am I doing something wrong, or is the only way to access the code via a
menu
command or button?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How Do I Run Subroutines in .xla files from VBA Code in Spread

Outstanding, thanks Bob - I know that will do it. I forgot about adding the
reference. I am at home, but will try it tomorrow in the office, I'm sure
that will fix it. Still learning my way around VBA vs. VB .Net

"Bob Umlas" wrote:

Try in the VBE making a reference via tools/references, and checking the
xla.

"John Loo" wrote in message
...
I created an add-in (.xla extension) from a spreadsheet with quite a bit of
code. I have installed the add-in, and can see it from the Tools- Add-ins
dialog box. It also appears in the VBE Project Map.

However, I can not access the code except by associating it with a button
or
command menu. When I try to access it in code, I get a "Subroutine not
defined" type of message.

Am I doing something wrong, or is the only way to access the code via a
menu
command or button?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default How Do I Run Subroutines in .xla files from VBA Code in Spread

I am having this same problem. I have created an xla add in, and now want to
use the subroutines and public variables. The .xla is added in and visible in
the project window.

I have tried to add the reference but only get the message

"Name conflict with existing module, project, or object library".

So I can't directly use the subroutines.

I can work around as :-

Application.Run("my.xla!mysubroutine", x,y,z)

but this does not allow me to access any public variables.

Does anyone have any ideas as to how I can create the reference?

Eric

"John Loo" wrote:

Outstanding, thanks Bob - I know that will do it. I forgot about adding the
reference. I am at home, but will try it tomorrow in the office, I'm sure
that will fix it. Still learning my way around VBA vs. VB .Net

"Bob Umlas" wrote:

Try in the VBE making a reference via tools/references, and checking the
xla.

"John Loo" wrote in message
...
I created an add-in (.xla extension) from a spreadsheet with quite a bit of
code. I have installed the add-in, and can see it from the Tools- Add-ins
dialog box. It also appears in the VBE Project Map.

However, I can not access the code except by associating it with a button
or
command menu. When I try to access it in code, I get a "Subroutine not
defined" type of message.

Am I doing something wrong, or is the only way to access the code via a
menu
command or button?




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
Subroutines vs. modules BrianG[_4_] Excel Programming 0 September 7th 04 10:21 PM
common subroutines - add-in Tom Ogilvy Excel Programming 2 August 25th 04 12:51 AM
Duplicate Subroutines Gary Elsner Excel Programming 8 September 14th 03 08:55 PM
Run method for subroutines Scott Excel Programming 1 August 26th 03 04:46 PM


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