ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How so I make a "Worksheet_Change Event" to show cell changes in Excel? (https://www.excelbanter.com/excel-programming/359854-how-so-i-make-worksheet_change-event-show-cell-changes-excel.html)

susiecmore

How so I make a "Worksheet_Change Event" to show cell changes in Excel?
 
How do I make all the cells on a worksheet change color when a change
has been made to any of the cells?

ie. "use Worksheet_Change event" then. If any change at all is made to
a cell I need o see the cell colored to identify a change has been
made.


Can someone explain exactly how I would make a "Worksheet_Change
event" to make this happen on my spreadsheet?


Tom Ogilvy

How so I make a "Worksheet_Change Event" to show cell changes in E
 
Look at Chip Pearson's site to get an overview of events:

http://www.cpearson.com/excel/events.htm

then you would right click on the sheet tab and select view code. Then in
the left dropdown at the top of the resulting module, select Worksheet and in
the right dropdown select CHANGE (not SELECTIONCHANGE)

You should get a declaration like this:

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

the target argument will hold a range reference to the cell that was
edited/changed and triggered the event


Private Sub Worksheet_Change(ByVal Target As Range)

End Sub


So you would use that to take action. for example:

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 3
End Sub

--
Regards,
Tom Ogilvy



"susiecmore" wrote:

How do I make all the cells on a worksheet change color when a change
has been made to any of the cells?

ie. "use Worksheet_Change event" then. If any change at all is made to
a cell I need o see the cell colored to identify a change has been
made.


Can someone explain exactly how I would make a "Worksheet_Change
event" to make this happen on my spreadsheet?




All times are GMT +1. The time now is 06:58 AM.

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