Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default 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" wrote in message .com...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default cell backgroundcolor


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


--
st120869
------------------------------------------------------------------------
st120869's Profile: http://www.excelforum.com/member.php...o&userid=18330
View this thread: http://www.excelforum.com/showthread...hreadid=492658

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options Yuvraj Excel Discussion (Misc queries) 0 June 29th 09 11:20 AM
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 [email protected] Excel Worksheet Functions 1 August 22nd 08 02:04 AM
How to create/run "cell A equals Cell B put Cell C info in Cell D abmb161 Excel Discussion (Misc queries) 5 January 26th 06 06:36 PM
Change backgroundcolor wborg Excel Discussion (Misc queries) 2 December 1st 05 02:13 AM
Assigning backgroundcolor to button on form Brotha lee Excel Programming 2 May 20th 05 09:55 PM


All times are GMT +1. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"