ToolstripSplitButtonItem causes temporary loss of Excel mouse context menu

Simon Martyn 1 Reputation point
2022-06-29T14:54:38.7+00:00

I am using ToolStripSplitButtons in TaskPanes in my Excel vsto
I notice that if I

  • select the Splitbutton drop-down in a taskpance to display the splitbutton's sub items BUT DO NOT select one of the items,
  • then select a worksheet,cell
    the right-click context menu is not available.
    Instead the mouse cursor continues to display the pointer rather than the usual fat white cross.
    I have tried using

app.Cursor = Microsoft.Office.Interop.Excel.XlMousePointer.xlDefault

and

app.CommandBars("cell").Reset()

on the LostFocus event of the taskpane but they have no effect.

The only way to get the mouse back to normal is to select a ToolStripSplitButton in one of the task panes.

Anyone know of another way to reset the mouse when the taskpane is not active or prevent the mouse from changing to a pointer when the ToolStripSplitbutton is selected?

Note: if I select one of ToolStripSubItems there is no issue, issue only occurs if I display the sub-items but do not select one.

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
1,945 questions
{count} votes