ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Change colour of data when changed (https://www.excelbanter.com/excel-discussion-misc-queries/88272-change-colour-data-when-changed.html)

Martin ©¿©¬ @REMOVETHIS.plus.com

Change colour of data when changed
 
Hello
I have been using the code below in my worksheets to change the colour
of updated/edited data.
Now it doesn't seem to be working

Any ideas why?

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

End Sub

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

Martin
©¿©¬

Ardus Petus

Change colour of data when changed
 
In VBE, Immediate window (Ctrl-G), type:
?application.enebleevents

If answer is false, type:
application.enebleevents=true

HTH
--
AP

<Martin ©¿©¬ @REMOVETHIS.plus.com a écrit dans le message de news:
...
Hello
I have been using the code below in my worksheets to change the colour
of updated/edited data.
Now it doesn't seem to be working

Any ideas why?

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

End Sub

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

Martin
©¿©¬




Bob Phillips

Change colour of data when changed
 
Maybe events are turned off. Go to the immediate window in the VBIDE and
type

Application.EnableEvents = True

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

<Martin ©¿©¬ @REMOVETHIS.plus.com wrote in message
...
Hello
I have been using the code below in my worksheets to change the colour
of updated/edited data.
Now it doesn't seem to be working

Any ideas why?

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

End Sub

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

Martin
©¿©¬




Martin ©¿©¬ @REMOVETHIS.plus.com

Change colour of data when changed
 
Thanks for your replies Ardus & Bob

I've found my problem
Enable macros was turned off, when I turned them back on my colour
changes began working again - happy days!!

Regards
Martin
©¿©¬


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

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