Is there a "cell change" event?
Is it possible to run some code when the value of a specific cell changes?
Thanks in advance. Mark Smith SPX Air Gage Co. |
Is there a "cell change" event?
Thanks Chip. It worked.
Mark Smith SPX Air Gage Co. "Chip Pearson" wrote in message ... Mark, You can use the Worksheet_Change event procedure to run code when a cell is changed by the user or by VBA (but not as the result of a calculation). E.g., the following will display a message box when cell A1 is changed. Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A1")) Is Nothing Then MsgBox "You changed A1." End If End Sub Put this code in the code module for the worksheet containing the cell you want to test. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Mark Smith" wrote in message ... Is it possible to run some code when the value of a specific cell changes? Thanks in advance. Mark Smith SPX Air Gage Co. |
All times are GMT +1. The time now is 11:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com