Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading