PC Review


Reply
Thread Tools Rate Thread

Can I run a macro in an xla from a button on a sheet

 
 
Michael
Guest
Posts: n/a
 
      17th Jun 2010
I want buttons on worksheets in my workbook to run a macro that is
stored in an add-in

I have called the macro 'Public Sub xxx()'

I have created a reference to the add-in in the workbook that will
have the buttons.

But I can't 'see' the macros in the add-in to be able to assign them
to the buttons.

Can I do it?

how?

Cheers

Michael
 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      17th Jun 2010
There are two ways to call procedures in other workbooks (incl addins).
First was is to set a reference (tools, References) to the project name (be
sure to have changed from the default VBAProject. But for your needs
probably better to use the Run method (though you won't get any
intellisense)

ret = Application.Run("myAddin.xla!moduleName.ProcName")

you can also include arguments.

Regards,
Peter T


"Michael" <(E-Mail Removed)> wrote in message
news:d16aa73d-f27f-46fc-b3ef-(E-Mail Removed)...
>I want buttons on worksheets in my workbook to run a macro that is
> stored in an add-in
>
> I have called the macro 'Public Sub xxx()'
>
> I have created a reference to the add-in in the workbook that will
> have the buttons.
>
> But I can't 'see' the macros in the add-in to be able to assign them
> to the buttons.
>
> Can I do it?
>
> how?
>
> Cheers
>
> Michael


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to copy a sheet and delete a macro button JoeP Microsoft Excel Programming 8 30th Sep 2009 06:14 PM
use macro button to run macro in protected sheet =?Utf-8?B?ZWFybA==?= Microsoft Excel Misc 3 26th Feb 2006 10:21 PM
Macro button on one sheet only =?Utf-8?B?Tmxlcmlj?= Microsoft Excel Programming 4 19th May 2005 07:46 PM
Pause macro, add form button to sheet, continue macro when button clicked! Flystar Microsoft Excel Programming 1 26th May 2004 09:45 AM
Macro Button on Sheet Sandra Microsoft Excel Programming 3 16th Mar 2004 10:47 PM


Features
 

Advertising
 

Newsgroups
 


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