![]() |
macro on exit of field
Is there a way to run a macro on exiting a cell. For example if I answer Yes
in cell A4, then I would like it to automatically go to A10 on exiting A4. |
macro on exit of field
Put this in the appropriate Sheet Module.
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$4" Then If Target = "Yes" Then Range("A10").Select End If End Sub Hth, Merjet |
macro on exit of field
You can use the on change code of the worksheet. Right click the sheet tab
and select View Code. I have made the code easy to expand and modify. Paste the following... Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case "$A$4" If UCase(Target.Value) = "YES" Then Range("A10").Select Case "$A$10" MsgBox "Change " & Target.Address End Select End Sub -- HTH... Jim Thomlinson "Manuel Murieta" wrote: Is there a way to run a macro on exiting a cell. For example if I answer Yes in cell A4, then I would like it to automatically go to A10 on exiting A4. |
macro on exit of field
This was already answered in a previous post.
In article , "Manuel Murieta" wrote: Is there a way to run a macro on exiting a cell. For example if I answer Yes in cell A4, then I would like it to automatically go to A10 on exiting A4. |
macro on exit of field
See responses to your same posting in public.excel news group.
Gord Dibben MS Excel MVP On Tue, 13 Feb 2007 12:41:25 -0500, "Manuel Murieta" wrote: Is there a way to run a macro on exiting a cell. For example if I answer Yes in cell A4, then I would like it to automatically go to A10 on exiting A4. |
All times are GMT +1. The time now is 08:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com