How to detect the cell's value change?

J

Jack

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
 
P

Per Jessen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top