Capture and display the cell number being double click as a History record


New Member
Jan 11, 2016
Hi All expert,

Can I check with you.. As I have a Tools booking system. However, notice, people book already and then unbook later.
So I want to track who double click the cell to unbook. How? I intend to record down the action that the user did in the form. Now I can record down the user name and date when people access the form but there is no record to see what cell they have double click. Hence, wonder how can I capture the cell number that they have double click on using VBA under sub routine Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

To record the history for user name and date, here is my code.
Cells(3, 9).Select
Do While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Activate

ActiveCell.Value = Now
ActiveCell.Offset(0, 1).Activate
ActiveCell.Value = Application.UserName
ActiveCell.Offset(0, 1).Activate
Cells(3, 9).Select

Any advise how can I add in one more line in above script to record down the cell number being double click? Your help is greatly appreciated. Thank you.


Well-known Member
Oct 5, 2015
Office Version
You can access the address of the clicked cell with 'Target.Address'. This returns an address such as $A$3. So you would want something like: ActiveCell.Offset(0, 2).Value=Target.Address
Last edited:

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...