N
nosliwgerg2
I just upgraded to 8.1 / Office 2013 and am trying to adapt some of my old xl2003 programs. I've encountered a dilemma with the right click "Cell" popup toolbar. I want to supplant it with my own for ease of access, instead of going through the Addins menu on the Ribbon. Problems:
1) If I create my own popup and call it using the Workbook_SheetBeforeRightClick event, setting the Cancel parameter to True, then an error state occurs. Specifically, if you delete a worksheet that is active thus forcing activation of another sheet, the mouse wheel isn't recognized and you can't close the workbook. If you select another worksheet through the UI and return then it's OK again. There does not appear to be a code workaround, e.g. selecting a different sheet before deleting the active sheet etc.
2) If I instead add my controls to the Cell toolbar and use the same eventto process the controls, displaying mine and hiding the native controls, then an autosense "Paste Options:" control is added, and I can't prevent it.
My take on this is that Excel tries to add the autosense control to the Cell toolbar. If it is not displayed then an error state is generated. The autosense addition happens AFTER the right click event is processed, and therefore, I cannot prevent it.
I tried parsing the Cell toolbar controls with the intent of disabling the Paste Options control proactively. However, it is not listed.
Your thoughts much appreciated. New to xl2013 and an amateur programmer.
Greg
1) If I create my own popup and call it using the Workbook_SheetBeforeRightClick event, setting the Cancel parameter to True, then an error state occurs. Specifically, if you delete a worksheet that is active thus forcing activation of another sheet, the mouse wheel isn't recognized and you can't close the workbook. If you select another worksheet through the UI and return then it's OK again. There does not appear to be a code workaround, e.g. selecting a different sheet before deleting the active sheet etc.
2) If I instead add my controls to the Cell toolbar and use the same eventto process the controls, displaying mine and hiding the native controls, then an autosense "Paste Options:" control is added, and I can't prevent it.
My take on this is that Excel tries to add the autosense control to the Cell toolbar. If it is not displayed then an error state is generated. The autosense addition happens AFTER the right click event is processed, and therefore, I cannot prevent it.
I tried parsing the Cell toolbar controls with the intent of disabling the Paste Options control proactively. However, it is not listed.
Your thoughts much appreciated. New to xl2013 and an amateur programmer.
Greg