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
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
>
> 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 can't do it efficiently, but you could use Volatile on the function
Functions For Cell Colors
http://www.cpearson.com/excel/colors.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
"keepITcool" <[email protected]> wrote in message news:[email protected]...
> 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
> >
> > 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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks