![]() |
Run Macro based on cell change
Is it possible to run a macro based on a change in a particular cell (ie.
cell color changes) that would automatically trigger a macro that would cut the entire row that the cell is in, and then paste it in a new sheet? I have tried running a macro by recording the action, but it does not seem to function... Thank you all! -- Kristina |
Run Macro based on cell change
No on cell colour change, that doesn't trigger any event.
-- __________________________________ HTH Bob "Binaface" wrote in message ... Is it possible to run a macro based on a change in a particular cell (ie. cell color changes) that would automatically trigger a macro that would cut the entire row that the cell is in, and then paste it in a new sheet? I have tried running a macro by recording the action, but it does not seem to function... Thank you all! -- Kristina |
Run Macro based on cell change
Color change is a formatting function and VBA does not recognize formatting
as an event. However, It is possible to evaluate the color of a cell and if it is, or is not, a certain color, then initiate some action. You could use the Worksheet_SelectionChange event to trigger the evaluation. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Interior.ColorIndex = 3 Then MsgBox "YES" End If End Sub "Binaface" wrote: Is it possible to run a macro based on a change in a particular cell (ie. cell color changes) that would automatically trigger a macro that would cut the entire row that the cell is in, and then paste it in a new sheet? I have tried running a macro by recording the action, but it does not seem to function... Thank you all! -- Kristina |
All times are GMT +1. The time now is 10:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com