Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Cell change to trigger Macro

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cell change to trigger Macro


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

--
Cari
-----------------------------------------------------------------------
Carim's Profile: http://www.excelforum.com/member.php...fo&userid=3325
View this thread: http://www.excelforum.com/showthread.php?threadid=53179

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Cell change to trigger Macro

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


"Carim" wrote:


Hi Sören,

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

HTH
Cheers
Carim


--
Carim
------------------------------------------------------------------------
Carim's Profile: http://www.excelforum.com/member.php...o&userid=33259
View this thread: http://www.excelforum.com/showthread...hreadid=531794


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trigger Event on Format Change Zone[_3_] Excel Discussion (Misc queries) 4 August 25th 07 05:43 PM
Cell value change to trigger macro (worksheet change event?) Neil Goldwasser Excel Programming 4 January 10th 06 01:55 PM
Trigger an event on Checkbox change James Geniti Excel Programming 0 September 1st 04 09:24 PM
Trigger an event on Checkbox change James[_28_] Excel Programming 2 September 1st 04 08:31 PM


All times are GMT +1. The time now is 04:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"