LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
WCM WCM is offline
external usenet poster
 
Posts: 59
Default Call Add-In Macro from VBA

I created a simple add-in that contains one module (module1) and that module1
contains a simple macro (macro1). I posted that add-in to a file folder on my
desktop and then added it to my Excel Application. So, if I look in the VB
Editor I can see the new .xla as a separate project in every Excel Workbook I
open.

QUESTION:
I can attach that .xla macro1 to a toolbar command icon (and it works). I
can also attach it to a simple Excel 'Button' and that works, too.

But when I insert a VB command button into a worksheet, and then add a
simple procedure to the click event, I cannot get the .xla macro to run. What
is the proper syntax? The following (or any other longer syntax I use)
doesn't work:

Private Sub CommandButton1_Click()
Macro1
End Sub

Thanks,
wcm
 
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
How can run a macro ( call a macro) on selection of any filtercriteria? [email protected] Excel Worksheet Functions 7 February 20th 09 12:34 AM
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
Excel Macro call Word Macro with Parameters Bill Sturdevant[_2_] Excel Programming 9 May 24th 07 12:21 AM
Call macro stored in Excel workbook from Outlook's macro Gvaram Excel Programming 0 October 4th 06 05:47 PM
ONe Macro won't call another CLR Excel Programming 4 September 6th 06 08:16 PM


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