Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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!! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Fantastic! Thanks for your help!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple cells or columns are selected instead of selected cell or | Excel Discussion (Misc queries) | |||
Macro to transfer contents of 'Selected' cell to alternate cell. | Excel Worksheet Functions | |||
Macro to take selected cells times a selected cell | Excel Programming | |||
how read value from last selected cell? It is possible? how get adress last selected cell? | New Users to Excel | |||
how read value from last selected cell? It is possible? how get adress last selected cell? | Excel Programming |