ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to Run VBA Code on cell or range change (https://www.excelbanter.com/excel-programming/378988-re-how-run-vba-code-cell-range-change.html)

Dave Peterson

How to Run VBA Code on cell or range change
 
Near the top of your code:

if target.cells.count 1 then exit sub
if intersect(target,me.range("b99")) is nothing then exit sub

And remember to turn off events if you're changing something (and don't want
that to cause the event to run again).

MikeZz wrote:

I want to run some code whenever someone changes a value in a particular cell
or range. I know how to do it on Worksheet_Change but don't want to have it
actually run code (slowing response down) every time any cell changes.

Is there a way to do this?

Thanks,
MikeZz


--

Dave Peterson


All times are GMT +1. The time now is 10:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com