Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 687355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:07:06+00:00 2026-05-14T02:07:06+00:00

Can some one recommend any free program which counts the number of clicks Clicked

  • 0

Can some one recommend any free program which counts the number of clicks Clicked inside a cell.

For Example Imagine something like Spreadsheet
I click on A1 cell the value shows 1
Then I click A1 cell again the value shows 2 and so on
If I click A3 cell somewhere in between the click count on Cell A3 shows 1 and so on

If something like this can be achieved as a macro with in excel (2003 please) please suggest or any other free program that you might be aware about, please do let me know. I appreciate all your help and thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:07:07+00:00Added an answer on May 14, 2026 at 2:07 am

    Excel doesn’t have a worksheet event for the mouse left click.

    It does have an event for ‘SelectionChange’ and this can be combined with an API call to check if the left mouse button was clicked.

    This code needs to go into the Sheet Object in the Project Explorer area for the worksheet that you are targeting.

    Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
    
    Private Const MOUSEEVENTF_LEFTDOWN = &H2
    Private Const MOUSEEVENTF_LEFTUP = &H4
    
    
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim Key As Integer
    
    If Target.Count > 1 Then Exit Sub
    ''//If multiple cells selected with left click and drag
    ''// then take no action
    
    Key = GetKeyState(MOUSEEVENTF_LEFTDOWN)
    
    If Key And 1 Then
        If IsNumeric(Target.Value) Then
            Target.Value = Target.Value + 1
    ''//Check to see if cell contains a number, before
    ''// trying to increment it
            Application.EnableEvents = False
                Target.Resize(1, 2).Select
            Application.EnableEvents = True
    ''//Resize the selection, so that if the cell is clicked
    ''// for a second time, the selection change event is fired again
        End If
    End If
    
    End Sub
    

    Although this code works, it can increment a cell value even if the user has not left clicked their mouse.


    I would recommend using the ‘BeforeDoubleClick’ event instead if possible. This is built into Excel and is more reliable than the code above.

    In order to increment a cell value, the user would need to double click on the cell.

    This code needs to go into the Sheet Object in the Project Explorer area for the worksheet that you are targeting.

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    
    If IsNumeric(Target.Value) Then
            Target.Value = Target.Value + 1
    ''//Check to see if cell contains a number, before
    ''// trying to increment it
            Application.EnableEvents = False
                Target.Resize(1, 2).Select
            Application.EnableEvents = True
    ''//Resize the selection, so that if the cell is clicked
    ''// for a second time, the selection change event is fired again
            Cancel = True
    ''//Stop the cell going into edit mode
    End If
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can some one please guide me to understand which jar file i need to
Can any one recommend me a good book for Winforms in .net 4.0 C#.
Can some one shed some light on the difference between XML and XMI? Can
Can some one tell me how do i display real time in c++. what
I have some data which can be represented by an unsigned Integral type and
can anyone recommend me nice tooltip script which is javascript library independent, meaning no
Questions / Issues If someone can recommend me a good free hosting site I
Can someone recommend an up to date library for data Sanitization in PHP ?
Can someone recommend a good, open source, standalone developer tool for querying SQL databases
Can someone recommend a payment gateway that allows incremental (irregularly recurring) charges to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.