Single click edit cell

Im looking to see if i can get a function within my project where when you click a cell it goes straight to edit mode, rather than having to double click the cell, i know that F2 does this but id rather it be done when the user clicks the cell and its into edit mode without having to do anything else other than clicking the cell.

There are two cells i need this to be applied too, G3 and G4.

Can you help?

Iv tried recording a macro but to no avail.

>Solution :

You double click on the applicable Sheet in the Project navigator:

enter image description here

And paste in the code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Address = "$G$3" Or Target.Address = "$G$4" Then SendKeys "{F2}"
End Sub

Leave a Reply