Change colour of cells when content is altered/changed

  • Thread starter Thread starter Martin ©¿©¬ somewhere
  • Start date Start date
M

Martin ©¿©¬ somewhere

Hi
I have a number of worksheets where the cell colour used to change to
Blue when an entry was made or edited
But it ain't doing it any more
--------------------------------------
This is the code

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
 
I'm getting messages that the macros are disabled
How do I enable them?
--
Martin
©¿©¬

The code appears to work fine, as written, but will only perform on the one
sheet where it's installed.......if you want it to work on other sheets, it
must be copied to their code sections as well..........

Vaya con Dios,
Chuck, CABGx3
 
The first two lines are doing nothing so you could delete them.

The Worksheet_Change code works for me.

If you want it available for all sheets place it in the Thisworkbook module as

Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub


Gord Dibben MS Excel MVP
 
Thanks CLR
I re-enabled the macros and they're working now
Don't understand how they got disabled
Perhaps installing my files to a new pc had something to do with it
 
The first two lines are doing nothing so you could delete them.

The Worksheet_Change code works for me.

If you want it available for all sheets place it in the Thisworkbook module

Thank you very much Gord, I didn't know that
That's another thing I've learnt today
 
Thanks for the feedback.

Learning something new every day has been my goal in life.


Gord

Thank you very much Gord, I didn't know that
That's another thing I've learnt today

Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top