Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Worksheet_Calculate() , How to find affected cells?

Hi,

Worksheet_Calculate(), I want to make cells change color when its value
change after recalculate.

Worksheet_Change() can use "Target.address" to locate the changed cells

How to find affected cells for Worksheet_Calculate()?
Worksheet_Calculate() have no "Target.address"


Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Worksheet_Calculate() , How to find affected cells?

I don't think that you can. The Calculation engine is all under the hood,
Excel uses a smart calculation model, that is it determines what cells need
recalculating but I don't believe that it exposes that data.

--
__________________________________
HTH

Bob

"SaltyBall" wrote in message
...
Hi,

Worksheet_Calculate(), I want to make cells change color when its value
change after recalculate.

Worksheet_Change() can use "Target.address" to locate the changed cells

How to find affected cells for Worksheet_Calculate()?
Worksheet_Calculate() have no "Target.address"


Thank you.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Worksheet_Calculate() , How to find affected cells?

Gary''s Student in microsoft.public.excel.worksheet.functions suggest me
to use static variables to keep track of the previous values of the
cells you are interested in, so that each time the Calculate Event
occurs, the code would compare the values in the static variables to the
values in the cells.

I think it should work but will cause some new problem, actually I am
using something like yahoo_quote functions download stock quote from
yahoo continuously, when the price go up, only the affected cell turn
green, when the price go down, only the affected turn red.

If use static variables, the main problem is
1)we don't know how many lines there will be and we need to code every cells
2)if we change the price column to another column, I need to change the
code every time.

any better suggestions?


Bob Phillips wrote:
I don't think that you can. The Calculation engine is all under the hood,
Excel uses a smart calculation model, that is it determines what cells need
recalculating but I don't believe that it exposes that data.

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
Locate changed cells with Worksheet_Calculate() FourLegSpider Excel Worksheet Functions 4 February 6th 09 02:39 PM
Formulas Affected by Insert Row MJS Excel Worksheet Functions 7 April 18th 08 01:21 AM
Formulas Affected by Insert Row MJS Excel Discussion (Misc queries) 0 April 11th 08 09:13 PM
inserting row...but the formula is not affected monika Excel Programming 2 April 19th 04 01:26 PM
"over-lay" one range onto another range so that only blank cells are affected Paul Simon[_2_] Excel Programming 2 August 6th 03 11:50 AM


All times are GMT +1. The time now is 10:10 PM.

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

About Us

"It's about Microsoft Excel"