![]() |
Last Selected Cell
Hi, I'm writing a macro which needs to run whenever a cell changes. To
do this I've set the macro to run on the Worksheet_Change function which works perfectly. The problem I'm having is how to establish the cell which was previously selected by the user before they either tab or carriage return. ie. If the user is on cells A3 and enters "here", I need to macro to tell me that the user changed row 3, column 1. Any ideas? Many Thanks!! |
Last Selected Cell
Target holds a reference to the cell that was changed.
Private Sub Worksheet_Change(ByVal Target As Range) msgbox Target.Address & " was changed and triggered this macro" End Sub -- Regards, Tom Ogilvy "DAV135" wrote: Hi, I'm writing a macro which needs to run whenever a cell changes. To do this I've set the macro to run on the Worksheet_Change function which works perfectly. The problem I'm having is how to establish the cell which was previously selected by the user before they either tab or carriage return. ie. If the user is on cells A3 and enters "here", I need to macro to tell me that the user changed row 3, column 1. Any ideas? Many Thanks!! |
Last Selected Cell
Fantastic! Thanks for your help!
|
All times are GMT +1. The time now is 05:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com