How to activate cells for editing with single clicking in Excel?
This article is talking about activating cells for editing with single click in Excel. Please do as follows step by step.
Activate cells for editing with single clicking by VBA code
Activate cell for editing with single clicking by VBA code
The following VBA code can help you to activate cells for editing with single clicking.
1. Open the worksheet you need to activate cells with single clicking. Right click the Sheet Tab and click View Code from the right-clicking menu.
2. In the opening Microsoft Visual Basic for Applications window, copy and paste the below VBA code into the Code window.
VBA code: Activate cell for editing with single clicking
#If Win64 Then
'Updated by Extendoffice 2018/2/2
Private Declare PtrSafe Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
#Else
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
#End If
Const VK_NUMLOCK = 144
Const VK_CAPITAL = 20
Const VK_SCROLL = 145
Dim xOldNLState As Long
Dim xOldCLState As Long
Dim xOldSLState As Long
Const KEY_MASK As Integer = &HFF80 '
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If (GetKeyState(vbKeyShift) And KEY_MASK) <> 0 Then Exit Sub
xOldNLState = GetAsyncKeyState(VK_NUMLOCK)
xOldCLState = GetAsyncKeyState(VK_CAPITAL)
xOldSLState = GetAsyncKeyState(VK_SCROLL)
SendKeys "{F2}"
If GetAsyncKeyState(VK_NUMLOCK) <> xOldNLState Then
Application.SendKeys "{NUMLOCK}"
End If
If GetAsyncKeyState(VK_CAPITAL) <> xOldCLState Then
Application.SendKeys "{CAPSLOCK}"
End If
If GetAsyncKeyState(VK_SCROLL) <> xOldSLState Then
Application.SendKeys "{SCROLLLOCK}"
End If
End Sub
3. Press the Alt + Q keys simultaneously to close the Microsoft Visual Basic for Applications window.
From now on, when single click on any cell in current worksheet, the cell will be activated immediately.
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!







