ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to detect the cell's value change? (https://www.excelbanter.com/excel-programming/435502-how-detect-cells-value-change.html)

jack

How to detect the cell's value change?
 
Hello,
In my vbasic application I am using Excel automation.
How to detect (which event to use) when user changes the value of the
selected cell?
Thanks,
Jack



Per Jessen

How to detect the cell's value change?
 
Hi Jack

The Worksheet_Change event is what you need. It returns a Target range,
which is the cell beeing changed.

Private Sub Worksheet_Change(ByVal Target As Range)
msg = MsgBox("Cell " & Target.Address & " has been changed")
End Sub

Regards,
Per

"Jack" <replyto@it skrev i meddelelsen
...
Hello,
In my vbasic application I am using Excel automation.
How to detect (which event to use) when user changes the value of the
selected cell?
Thanks,
Jack




All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com