Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel VBA: How to track changed cells

Hello world,

I'd like to have an Excel 2003 VBA macro be automatically called each time
that the user changes the value of a cell (by either directly entering a new
value of using copy/paste).

* How can I make my macro be automatically called in such a case?
* How can I detect which cells was changed from inside the macro?

My macro should check the new cell value and change it under certain
conditions. In case the cell value is changed by my macro, is there a way to
prevent the macro from being called again for the same cell?

Jens

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default Excel VBA: How to track changed cells

Hi Jens,
Within a macro, you are in control and should program accordingly.

For changes of constants (text or numbers) you can use a
Worksheet Change Event, which can be selective as to which
columns or rows you want to ignore or accept changes from.
http://www.mvps.org/dmcritchie/excel/event.thm
and inserting or deleting rows would be another matter.

I don't think you will find recording changes very practical. The
builtin Highlight Change is a major nuisance, for all but a few things
like a final version (mignt be practical, but still a nuisance even for that purpose).
Highlight, Change Highlighting
http://www.mvps.org/dmcritchie/excel/highlite.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jens Lenge" wrote in message ...
Hello world,

I'd like to have an Excel 2003 VBA macro be automatically called each time
that the user changes the value of a cell (by either directly entering a new
value of using copy/paste).

* How can I make my macro be automatically called in such a case?
* How can I detect which cells was changed from inside the macro?

My macro should check the new cell value and change it under certain
conditions. In case the cell value is changed by my macro, is there a way to
prevent the macro from being called again for the same cell?

Jens



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel VBA: How to track changed cells

I'll have a look.
Thanks for your advice!
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
Can selected Excel 2007 cells be changed to have more contrast? Bob J H Setting up and Configuration of Excel 3 June 3rd 08 05:14 PM
How can cells be changed from rectangle to triangle in Excel? MD Excel Discussion (Misc queries) 1 February 21st 08 02:32 AM
How would I track a rolling set of 30 cells? CJ Barnes Excel Worksheet Functions 3 February 25th 07 05:35 PM
Need to track cells that haven't been updated telewats Excel Discussion (Misc queries) 2 January 24th 06 07:16 PM
Using multiple worksheets to keep track of changed values? Cybert Excel Programming 6 December 6th 04 10:55 AM


All times are GMT +1. The time now is 05:05 PM.

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

About Us

"It's about Microsoft Excel"