Cell change to trigger Macro

G

Guest

How can I trigger a Macro when the value in a cell is changed?
Or can I have my macro triggd if any cell on my workshhet is changed?
 
C

Carim

Hi Sören,

Yes, with an event macro stored inthe module of the respectiv
worksheet:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$10" Then '<<<< change cell to suit you
needs
yourcode
End Sub

HTH
Cheers
Cari
 
G

Guest

Hi Carim,

Thanks for the help.
It works very good.

I have also tested to skip the If-statment to get it to trigg on all type of
changes in the worksheet. But it does not work so good.
It hangs Excel at 100% CPU-load. So I skip that.

BR,
/Sören
 

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