cell backgroundcolor

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

How can if run a function after an user changed the backgroundcolor of a
cell? The function must run with a macro or after leaving the colored cell.

Thanks
 
you cant.

only changing the formula (e.g. the value) if a cell
will trigger an event. changing formatting cannot be caught.

a workaround is trapping the selection change event..
but you'll have to store the formats in a cache..
then compare the actuals with the cached values when
selection changes.

this will be cumbersome and slow if the user makes large selections.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Starting vba programmer wrote :
 
Hello,
My question is an adaption of the first thread - I have used the scrpit
below to change the background colour of any cell contacts that have
been changed. I would like to adapt it to only change cells when the
user changes a formula inside the cells.

I do not want to protect the cell contents

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 37
Target.Interior.Pattern = xlSolid
End Sub
 

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