Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can I run a macro in an xla from a button on a sheet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Can I run a macro in an xla from a button on a sheet

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" wrote in message
...
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
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
Macro to copy a sheet and delete a macro button JoeP Excel Programming 8 September 30th 09 06:14 PM
Macro Button in a work sheet Finance Guru Excel Discussion (Misc queries) 9 November 15th 07 09:17 PM
use macro button to run macro in protected sheet earl Excel Discussion (Misc queries) 3 February 26th 06 10:21 PM
Macro button on one sheet only Nleric Excel Programming 4 May 19th 05 07:46 PM
Pause macro, add form button to sheet, continue macro when button clicked! Flystar[_15_] Excel Programming 1 May 26th 04 09:45 AM


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