none
What is the event triggered on editing a cell? RRS feed

  • Question

  • What is the event triggered on editing a cell?

    I want to disable controls inside a Ribbon of my Excel AddIn upon user editing any cell.

    I am using VSTO and VS 2013 Excel 2010 Excel AddIn to create the AddIn.

    Please suggest.



    Wednesday, September 23, 2015 11:28 AM

Answers

  • Hi Animesh,

    >>What is the event triggered on editing a cell?

    As the reply from Stefan, there is no such event to detect on editing a cell. Excel does not provide an interface for outside components to detect "Edit mode" (e.g. when a cell is accepting input), though in Excel itself it can do it. In addition, when Excel is in "Edit Mode", macro will not run. Therefore, if such interface is not provided, it is not possible for an addin to detect "Edit mode".

    For a workaround, I think you could use Worksheet_BeforeDoubleClick. It will fire when you before double click a cell, and you could do what you want in this event. But this event will not fire if you use “F2” to edit a cell.

    Best Regards,

    Edward


    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 24, 2015 2:28 AM

All replies

  • Imho there's none. I'm only aware of the change event, which is fired after a cell has changed. See also this thread.

    Try evaluating ActiveCell, when your control is activated.

    Wednesday, September 23, 2015 11:49 AM
  • ActiveCell did not work.
    Wednesday, September 23, 2015 2:37 PM
  • Thanks for your response but  ActiveCell did not work.
    Wednesday, September 23, 2015 4:04 PM
  • Hi Animesh,

    >>What is the event triggered on editing a cell?

    As the reply from Stefan, there is no such event to detect on editing a cell. Excel does not provide an interface for outside components to detect "Edit mode" (e.g. when a cell is accepting input), though in Excel itself it can do it. In addition, when Excel is in "Edit Mode", macro will not run. Therefore, if such interface is not provided, it is not possible for an addin to detect "Edit mode".

    For a workaround, I think you could use Worksheet_BeforeDoubleClick. It will fire when you before double click a cell, and you could do what you want in this event. But this event will not fire if you use “F2” to edit a cell.

    Best Regards,

    Edward


    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 24, 2015 2:28 AM