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

EvelynLu

New Member
Joined
Jan 11, 2016
Messages
46
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
Loop

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.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top