Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a "lost focus" or change event in Excel? I want
to launch some code when a user exits a particular cell. I have looked at the other similar questions in this particular newsgroup and they are not helpful. Any additional insights would be greatly appreciated. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
use the default sheet's SelectionChange event. the parameter is the new
cell's address, however, if you save this into a public variable, it will become the moved from cell at the next change. Just set up the open event to select say A1 which will fire the event & populate the variable Example:copy this code to the active sheet's code page: Option Explicit Public LastCell As String Private Sub Worksheet_Deactivate() Application.StatusBar = False End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.StatusBar = "FROM:" & LastCell & " TO" & Target.Address LastCell = Target.Address End Sub -- Patrick Molloy Microsoft Excel MVP ---------------------------------- "Craig" wrote in message ... Is there a "lost focus" or change event in Excel? I want to launch some code when a user exits a particular cell. I have looked at the other similar questions in this particular newsgroup and they are not helpful. Any additional insights would be greatly appreciated. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable cell focus | Excel Discussion (Misc queries) | |||
Active Cell/Focus | Excel Discussion (Misc queries) | |||
Temporary formatting of cell with focus | Excel Discussion (Misc queries) | |||
Outline color of cell that has focus | Excel Discussion (Misc queries) | |||
Highlight Cell on Focus | Excel Programming |