Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to call module function or sub from the Add In?
Hi all,
I have an Add In which is used by many worksheets. In every worksheet module there is the starting sub 'Start'. I created the icon in the Quick Access Toolbar and connected it to the macro located in Add In. From this macro I want to run the sub Start, which is in module belonging to currently opened worksheet. In summary, the point is to use one icon to run the macro 'Start' in different worksheets. But it's not working. Excel says 'Sub of Function not defined'. It's there any way to run module macro from an Add In? Thanks in advance. Archidamos |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to call module function or sub from the Add In?
Hi,
Am Fri, 21 Feb 2014 06:35:40 -0800 (PST) schrieb Archidamos: I have an Add In which is used by many worksheets. In every worksheet module there is the starting sub 'Start'. I created the icon in the Quick Access Toolbar and connected it to the macro located in Add In. From this macro I want to run the sub Start, which is in module belonging to currently opened worksheet. In summary, the point is to use one icon to run the macro 'Start' in different worksheets. if you run a macro from a different workbook you have to write the workbook name and the macro name like this: Application.Run ("'" & ActiveWorkbook.Name & "'!Start") Regards Claus B. -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to call module function or sub from the Add In?
W dniu pi±tek, 21 lutego 2014 15:59:04 UTC+1 użytkownik Claus Busch napisał:
Application.Run ("'" & ActiveWorkbook.Name & "'!Start") Thank you very much Claus! Regards Archidamos |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to call module function or sub from the Add In?
Typically, addins create their own menus/toolbars at startup and remove
them at shutdown. This is particularly the case when the addin's procedures are to be used with other workbooks. In early versions of Excel addin menus are placed on the default menubars and/or use their own toolbar. In 2007 and later these will appear on the 'Addins' tab of the Ribbon. So there's no need to use the QAT, and there's never a question as to whether the macros associated with custom menus are available since they're created when the addin opens and removed before it closes. -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Module call | Excel Programming | |||
Call other sub in the same module | Excel Programming | |||
how to call Access's function in different module in Excel VBA | Excel Programming | |||
how to call Access function&module in Excel VBA?? | Excel Programming | |||
Call Private Function from ThisWorkbook module | Excel Programming |