How to Intercept the Copy of string into a Numeric cell

Posted by: greygranite on 8 September 2017, 1:42 pm EST

  • Posted 8 September 2017, 1:42 pm EST

    Hello,


    When attempting to paste (by value) a string into a numeric cell type, the paste fails without any obvisious notification.  The cell does not change but there must be some internal validation going on that the cell decides not to paste that data.


     Is there an event or calc error type code that can be watched for to notify the user that the action was invalid?  I'm looking to capture this failure and display a message box to the user that their paste was invalid.


    Thanks,


    Ed Ostrowski

  • Replied 8 September 2017, 1:42 pm EST

    Ed,


    There is not a way to do this now. I will write this up as a bug/enhancement (#24525) to fire the Error and/or EditError events when this happens.

  • Replied 8 September 2017, 1:42 pm EST

    Thanks Scott.


     While on the topic, does the EditError always fire when there is an error in cell data entry/interaction? (besides the previous instance of course)


     Say you attempt to type a string character into a number cell and want to catch that error so a beep sound can be sounded.  Would putting in a check in the EditError event be able to capture that?  Or an invalid formula is entered.  For example, ==round(A1, 2) is typed in and enter key pressed.  The user does not currently receive any indication of an invalid action.  The invalid formula is eaten and the previous value in the cell is restored.  Is there a condition that can be checked for in the EditError or some other event?


    Thanks again,


    Ed Ostrowski


     

  • Replied 8 September 2017, 1:42 pm EST

    Ed,


    The EditError event should fire when a user is typing an invalid character in a cell. So this should fire for your first scenario. For the formula scenario, you would need to use the Error event.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels