Posts by mkgan

    Re: Detect If Cell Is In 'editing' Mode

    Sorry for the mistake (code tags) I made.

    Using error handling doesn't really helps for me. I need to know exactly if it is in the 'editing' mode. I am not sure 'editing' mode is the right term as I cannot find any relevant properties/routines of the excel application or cell objects. I feel 'editing' mode is make sense as it is when we double click on the cell and going to edit the cell.

    The event below is triggered when I click on the button.

    Private Sub MyButton_Click(ByVal Ctrl As Office.CommandBarButton, CancelDefault As Boolean)

    Re: Detect If Cell Is In 'editing' Mode

    Yes, as the 'behaviour' is different when we program for it. 'Editing' mode can cause error if we do not handle properly.

    A further question might be: if we have detected it is in 'editing' mode, how can set it back to 'focus' mode through the vba macro?


    I'm doing the vba programming for excel where I added a button to the excel, and when user click on the button, it will trigger my function.

    My question is: if currently there is a cell been focused, how can I know whether that is in the 'editing mode' (ie, focus on that cell and double click on that) or merely 'focus' on that cell? Any of the excel object property for this?

    Thanks in advance.