none
Ribbon buttons cannot be actioned by the mouse in Excel 2013 RRS feed

  • Question

  • In an Excel VSTO that works perfectly in Excel 2007 and 2010 there is a problem when it is used in Excel 2013.

    The ribbon buttons, both in the menu ribbon and on the right-click cell menu become unresponsive to the mouse - although can be actioned using the up and down arrows, or shortcut letter.

    It is only the second level down buttons that become inactive: On the right-click menu, I have added a (msoControlPopup) button above the built-in Cut menu button, and I can click on that with the mouse to display the sub-menu buttons, but I can not click on these sub menu items with the mouse.  

    Initially when I open Excel all the menu buttons work fine, but if I run a process that downloads a lot of data from a webservice using the VSTO the second level buttons stop responding to the mouse. Once the issue occurs, the built in second-level buttons off the Filter and Sort menus also become unresponsive.

    This happens on multiple different pcs, 64 & 32 bit and on Windows 7, 8.1 and 10

    What has changed in Excel 2013 that means the ribbon buttons become unresponsive?

    I have also seen similar unresponsiveness with the standard ribbon to the point where Excel becomes unusable. A search for answers online only seem to suggest disabling all addins but there are no other addins enabled. It also indicates that there must be a common issue with addins and the ribbon buttons.

    Any suggestions greatly received.

    Wednesday, September 16, 2015 5:03 PM

All replies

  • Hi MerlinXL,

    I am trying to reproduce this issue however failed. I created an menu control on the custom group and put the second menu on the first menu item. Here is the figure for the ribbon design:

    And from the description, it seems that this issue is relative to that downing the data via the button click. Is it helpful to create a new thread for downloading data? Because if we use the main thread for a long time task, it may cause the Excel unresponsive.

    If you still have this issue, would you mind sharing more detail to help us to reproduce this issue.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 17, 2015 5:44 AM
    Moderator
  • I believe I have found the cause.

    My VSTO has to use VBA code in an xlam to add the data from the webservice to the worksheet. (This is because the VBA performance is much better for putting data in a cell than using the .NET Interop - Interop performance is unusably slow for the volume of data).

    As part of the process, the vba code copies and pastes cell formats to correctly format the report. It seems that if the report is above a certain size (> 150 rows) the copy and paste function seems to cause the ribbon (second level) menus to become unresponsive to the mouse.

    If I run reports of less than 100 rows the issue does not occur no matter how many times I run the report.  If I run the same report with more than 150 rows the issue occurs.

    If I comment out the lines of vba that copy and pastes the cell formats, the issue does not occur no matter how large the report is.

    Thank you for your assistance. Unless anyone can suggest an alternative I will remove the offending vba code when using Excel 2013 and consider the question answered.

    (I still get lots of other issues with the GUI- for example if I type something into a cell after running a large report the cell contents disappear when I click on another cell. I believe there are many problems with Excel 2013 and the new single document interface, especially when you do long processes involving vba and opening and closing workbooks. I would probably never have reached this point had I developed directly in Excel 2013, but as this is one migrated from Excel 2007 I have encountered all sorts of incompatibilities and conflicts).

    Thursday, September 17, 2015 5:13 PM
  • Hi MerlinXL,

    Thanks for the detail information for this issue. It seems that the issue is relative to the performance of VBA macro.

    Would you mind sharing the VBA how you copy and paste the data? Based on my understanding, it is much slow if we set the data by multiple cells.

    Here are two example for your reference. The first is set values cell by cell:

    Sub SetValueByCells()
    Application.ScreenUpdating = False
    For i = 1 To 100
    For j = 1 To 100
        Cells(i, j).Value = i
    Next j
    Next i
    
    End Sub

    The second sample is that set values by array:

    Sub SetValueByArray()
    Dim MyArray(1 To 100, 1 To 100) As Integer
    For i = 1 To 100
    For j = 1 To 100
        MyArray(i, j) = i
    Next j
    
    Next i
    Range(Cells(1, 1), Cells(100, 100)).Value = MyArray
    
    End Sub


    The second method is much faster than the first one. We can use the code below to track the time spending:

    Sub TestRangePerformance()
    
    Dim StartTime As Double
    Dim EndTime As Double
    
    StartTime = Timer
    
    SetValueByCells
    
    Debug.Print Timer - StartTime
    
    End Sub

    In addition, here are some helpful articles about Excel performance for your reference:
    Excel VBA Performance Coding Best Practices

    Excel 2010 Performance: Tips for Optimizing Performance Obstructions

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 18, 2015 7:26 AM
    Moderator
  • Thank you for the code.

    However as the output is a financial report the data is not entered in to a table, but placed in specific cells on the worksheet. There is other user entered information around each data cell. Adding a flat table would be quicker but not appropriate in this case as it would overwrite all the cells in the table range

    Also it is the copy and pastespecial format that are the lines that cause the issue with the ribbon.

    The long term solution is to remove the vba as given all the other issues I'm experiencing it seems to be incompatible with Excel2013 for large, complex processes.

    Friday, September 18, 2015 8:27 AM
  • Hi MelinXL,

    Since the issue is complex, I suggest you contacting Microsoft support to raise an incident so that our engineer could work closely with him to identify the root cause and resolve this issue as soon as possible.

    If the support engineer determines that the issue is the result of a bug the service request will be a no-charge case and you won't be charged.

    Please visit the below link to see the various paid support options that are available to better meet your needs.

    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 21, 2015 10:00 AM
    Moderator