Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Call Subx for excel 97 Add-In subroutine

Set a reference to the addin in the VBE, ToolsReferences.

Before doing so, it is probably a good idea to give the project a meaningful
name in the VBE.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dave D-C" wrote in message
...
I've looked at the web sites re add-ins and excel 97 but I must be
missing something. To call a subroutine in the add-in, I still
have to use Application.Run.

My Add-in is Addin1.xla.
It is checked in the Tools/Addins dialog.
It loads when I start excel (I see
VBAProject(Addin1.xla) in the ProjectExplorer).
ThisWorkBook/IsAddin is True.
The sheets are hidden/invisible.
Subroutine ASub1 is in Module1:
Public Sub ASub1()
msgbox "ASub1"
End Sub

On a new workbook, in Module1:
Application.Run "Addin1!asub1" ' works
Application.Run "asub1" ' works
call asub1 ' gives 'Sub or Function not defined'

Isn't this supposed to work for an Add-In?

TIA, Dave


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet

News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+

Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption

=----


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Call Subx for excel 97 Add-In subroutine

You have to use application.run unless you create a reference to the addin
from the workbook where you want to run it.

--
Regards,
Tom Ogilvy


"Dave D-C" wrote in message
...
I've looked at the web sites re add-ins and excel 97 but I must be
missing something. To call a subroutine in the add-in, I still
have to use Application.Run.

My Add-in is Addin1.xla.
It is checked in the Tools/Addins dialog.
It loads when I start excel (I see
VBAProject(Addin1.xla) in the ProjectExplorer).
ThisWorkBook/IsAddin is True.
The sheets are hidden/invisible.
Subroutine ASub1 is in Module1:
Public Sub ASub1()
msgbox "ASub1"
End Sub

On a new workbook, in Module1:
Application.Run "Addin1!asub1" ' works
Application.Run "asub1" ' works
call asub1 ' gives 'Sub or Function not defined'

Isn't this supposed to work for an Add-In?

TIA, Dave


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet

News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+

Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption

=----


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Call Subx for excel 97 Add-In subroutine

I've looked at the web sites re add-ins and excel 97 but I must be
missing something. To call a subroutine in the add-in, I still
have to use Application.Run.

My Add-in is Addin1.xla.
It is checked in the Tools/Addins dialog.
It loads when I start excel (I see
VBAProject(Addin1.xla) in the ProjectExplorer).
ThisWorkBook/IsAddin is True.
The sheets are hidden/invisible.
Subroutine ASub1 is in Module1:
Public Sub ASub1()
msgbox "ASub1"
End Sub

On a new workbook, in Module1:
Application.Run "Addin1!asub1" ' works
Application.Run "asub1" ' works
call asub1 ' gives 'Sub or Function not defined'

Isn't this supposed to work for an Add-In?

TIA, Dave


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Call Subx for excel 97 Add-In subroutine

Dave D-C wrote:
...
Dave wrote:
.. Add-In ..
TIA, Dave


BobPh wrote
.. reference ..


TomOg wrote
.. reference ..


That's what I was missing, of course.
If I say TIA in my original post, do I have to say Thank you?

In reality, I feel incomplete if I don't say THANK YOU!
Dave D-C



----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Call Subx for excel 97 Add-In subroutine

You don't HAVE to respond with a thankyou, but lots of people like to see it.

That way, they know that you have an answer (and they didn't waste their time
providing an answer that may not have been read). And it gives feedback that
the suggested solution worked.

(If I respond with a suggestion that doesn't even come close to working, then
your response may stop me from using it for a similar question by different
poster.)

On the other hand, lots of people won't respond to your "thanks" message. But
lots do.

Dave D-C wrote:

Dave D-C wrote:
..
Dave wrote:
.. Add-In ..
TIA, Dave


BobPh wrote
.. reference ..


TomOg wrote
.. reference ..


That's what I was missing, of course.
If I say TIA in my original post, do I have to say Thank you?

In reality, I feel incomplete if I don't say THANK YOU!
Dave D-C

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----


--

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
Call a subroutine using variable subroutine name dhstein Excel Discussion (Misc queries) 3 July 26th 09 08:28 PM
Call Center Management: How to calculate 'cost per call' Denniso6 Excel Discussion (Misc queries) 2 June 25th 06 05:01 PM
Breakpoint will not stop Excel subroutine boswald Excel Discussion (Misc queries) 2 August 24th 05 12:24 AM
Every second subroutine dolegow Excel Programming 1 October 12th 03 02:11 AM
Subroutine call without file reference jaf Excel Programming 0 August 25th 03 05:52 PM


All times are GMT +1. The time now is 03:29 AM.

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"