Can someone please advise me what I need to change to overcome what appears to be some weird behaviour with custom menus in 2013? The situation is as follows.
I have an application comprising two "control" workbooks, an Add-in, and then many other workbooks. The user opens the first control workbook, and this causes the Add-in to be loaded. Once the Add-in is loaded, the second control workbook is opened (it remains the active workbook), and then the custom menu is then created and added to the menu bar (annoyingly behind the ADDIN button on the ribbon, but I've got over that!) The user now has access to the application, and using buttons on the custom menu (and its sub-menus) can open and process other workbooks.
The application was originally written in 1997 and so has been through various Excel versions (2003, 2010) with no changes - working happily in each. I now have to make sure the application runs correctly in 2013 - and, by and large, it does. However, I have noted a couple of very annoying things to do with my custom menu.
1. When the application goes through the start up process, the ADDIN menu button, only appears on the second control workbook: there is no custom menu available on the first one. I do not want to add the menu until the second workbook is opened in case there are some processing issues. Do I have to activate the first control workbook before adding the custom menu? If so, what does this do for the second workbook which is now already open.
2. During development testing, I occasionally have to re-define the menu. In 2010 and previous versions, I could do this by hitting ALT + F8 and running a macro to reset the menu back to the "out of the box" menu, and then re-defining the custom menu to get the new version. However, when I do this from one of the user workbooks, I find that the new menu is created in the workbook that was active when I pressed ALT + F8, but the custom menu has not been updated on any of the other workbooks that were open at the time.
It almost seems as though the custom menu is no longer "application-wide" but each workbook has its own version that is copied from somewhere, but then behaves independently.
Am I missing something in the definition of the menu bar that has changed from 2010 to 2013?
Any help gratefully received
Nigel H
I have an application comprising two "control" workbooks, an Add-in, and then many other workbooks. The user opens the first control workbook, and this causes the Add-in to be loaded. Once the Add-in is loaded, the second control workbook is opened (it remains the active workbook), and then the custom menu is then created and added to the menu bar (annoyingly behind the ADDIN button on the ribbon, but I've got over that!) The user now has access to the application, and using buttons on the custom menu (and its sub-menus) can open and process other workbooks.
The application was originally written in 1997 and so has been through various Excel versions (2003, 2010) with no changes - working happily in each. I now have to make sure the application runs correctly in 2013 - and, by and large, it does. However, I have noted a couple of very annoying things to do with my custom menu.
1. When the application goes through the start up process, the ADDIN menu button, only appears on the second control workbook: there is no custom menu available on the first one. I do not want to add the menu until the second workbook is opened in case there are some processing issues. Do I have to activate the first control workbook before adding the custom menu? If so, what does this do for the second workbook which is now already open.
2. During development testing, I occasionally have to re-define the menu. In 2010 and previous versions, I could do this by hitting ALT + F8 and running a macro to reset the menu back to the "out of the box" menu, and then re-defining the custom menu to get the new version. However, when I do this from one of the user workbooks, I find that the new menu is created in the workbook that was active when I pressed ALT + F8, but the custom menu has not been updated on any of the other workbooks that were open at the time.
It almost seems as though the custom menu is no longer "application-wide" but each workbook has its own version that is copied from somewhere, but then behaves independently.
Am I missing something in the definition of the menu bar that has changed from 2010 to 2013?
Any help gratefully received
Nigel H