Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have created some CommandBarButtons. I assign which macro to run when selecting the menu item by using the OnAction property. myMenyItem.onAction = "updateData" I would like two run several macros instead of one, in fashion og myMenyItem.onAction = "updateData1 : updateData2 : updateScreen" where updateData1, updateData2, updateScreen are three different subs. Is this possible? Best Regards Eric |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Try creating a wrapper sub which calls the three: e.g. ... myMenyItem.onAction = "WrapperSub" ... sub WrapperSub() updateData1 updateData2 updateScreen end sub Co -- colofnatur ----------------------------------------------------------------------- colofnature's Profile: http://www.excelforum.com/member.php...fo&userid=3435 View this thread: http://www.excelforum.com/showthread.php?threadid=56278 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can one macro form another:
Sub updateData() Call updateData1 Call updateData2 Call updateScreen End sub wrote in message ups.com... Hi, I have created some CommandBarButtons. I assign which macro to run when selecting the menu item by using the OnAction property. myMenyItem.onAction = "updateData" I would like two run several macros instead of one, in fashion og myMenyItem.onAction = "updateData1 : updateData2 : updateScreen" where updateData1, updateData2, updateScreen are three different subs. Is this possible? Best Regards Eric |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() NickHK wrote: You can one macro form another: Sub updateData() Call updateData1 Call updateData2 Call updateScreen End sub [...] Yes, I know I can do it like this, but since I have a lot of permutations of how to run the macros (macro1 - macro3 - macro2, macro3 - macro1, et.c) I would be happy if I did not have to clutter the workbook with a lot of macros. Like an if-then, you can write it on one row and separate expressions with ":". Best Regards Eric |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If it really matters to you to confuse the coding in order to save a few
lines: Sub updateData() updateData1: updateData2: updateScreen End sub NickHK wrote in message ups.com... NickHK wrote: You can one macro form another: Sub updateData() Call updateData1 Call updateData2 Call updateScreen End sub [...] Yes, I know I can do it like this, but since I have a lot of permutations of how to run the macros (macro1 - macro3 - macro2, macro3 - macro1, et.c) I would be happy if I did not have to clutter the workbook with a lot of macros. Like an if-then, you can write it on one row and separate expressions with ":". Best Regards Eric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assign different macros for True/False button | Excel Discussion (Misc queries) | |||
Assign Macros to a dropdown list | Excel Programming | |||
How to stop having to re-assign macros every time you open a workbook??? | Excel Programming | |||
Assign macros to dynamically created form elements | Excel Programming |