+ Reply to Thread
Results 1 to 4 of 4

cell backgroundcolor

  1. #1
    Starting vba programmer
    Guest

    cell backgroundcolor

    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



  2. #2
    keepITcool
    Guest

    Re: cell backgroundcolor

    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


  3. #3
    David McRitchie
    Guest

    Re: cell backgroundcolor

    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




  4. #4
    Registered User
    Join Date
    01-12-2005
    Posts
    13

    Changing cell colour if formula chnage

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1