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

.



Relevant Pages

  • Re: VBA: For Count, when count changes from cell to cell
    ... reporting Macro being unavailable. ... Dim LastRowOfData As Long ... Dim LC As Integer ' Loop Counter ... means that you can refer to it in a cell just like a built-in Excel function. ...
    (microsoft.public.excel.misc)
  • Re: VBA: For Count, when count changes from cell to cell
    ... with Excel 2000. ... reporting Macro being unavailable. ... Sub CalculateI3() ... means that you can refer to it in a cell just like a built-in Excel function. ...
    (microsoft.public.excel.misc)
  • RE: Changing data in .csv file
    ... Const cszScrFileCell As String = "C4" ' cell with the name of original file ... Dim vFileName As Variant ... Name that sheet 'Main'. ... You now need to paste the code above into a macro. ...
    (microsoft.public.excel.misc)
  • Re: Automatically copy formulae to next empty row
    ... "Otto Moehrbach" wrote: ... One small thing I notice, when a row is copied, the macro copies the ... change is made to the contents of ANY cell in the entire sheet. ... This copied the formulas, data, and Data Validations. ...
    (microsoft.public.excel.programming)
  • Re: VBA: For Count, when count changes from cell to cell
    ... reporting Macro being unavailable. ... Dim LastRowOfData As Long ... Dim LC As Integer ' Loop Counter ... means that you can refer to it in a cell just like a built-in Excel function. ...
    (microsoft.public.excel.misc)