VB to Determine cell is selected

Rocky0201

Active Member
Joined
Aug 20, 2009
Messages
278
In my VB module for ny worksheet, I have a sub BeforeDoubleClick and a sub Change. These both work great...

Is there an event that would trigger if the user just clicks on any cell? I tried to use Activate but that only works if I click on the worksheet tab from another worksheet.

My goal is to save pertainant information from K4 before K4 is changed or the user double clicks K4.

My problem is that once the BeforeDoubleClick or Change subs are used, that data has already changed in K4.

Thanks
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
You need a third event procedure

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address(False, False) = "K4" Then
'
'do your stuff
'
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

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