Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recalculation Done event?
My application reads data from Excel workbook and, therefore, is hooked to Excel (2003). Is there any API available to find if the recalculation for the workbook (that my app uses) is over? Bascially, I want to read data only once after recalculation in the workbook finishes. -- Lavneet Singh ------------------------------------------------------------------------ Lavneet Singh's Profile: http://www.excelforum.com/member.php...o&userid=28942 View this thread: http://www.excelforum.com/showthread...hreadid=486771 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recalculation Done event?
One way is to have a cell which changes value depending on the calculation
state. eg Range("A1").Value = 0 Worksheets("Sheet1").Calculate Range("A1").Value = 1 Test the value of A1 before reading the data. -- Ian -- "Lavneet Singh" wrote in message news:Lavneet.Singh.1yua1z_1132563602.3591@excelfor um-nospam.com... My application reads data from Excel workbook and, therefore, is hooked to Excel (2003). Is there any API available to find if the recalculation for the workbook (that my app uses) is over? Bascially, I want to read data only once after recalculation in the workbook finishes. -- Lavneet Singh ------------------------------------------------------------------------ Lavneet Singh's Profile: http://www.excelforum.com/member.php...o&userid=28942 View this thread: http://www.excelforum.com/showthread...hreadid=486771 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recalculation Done event?
Hello Lavneet Singh, I am assuming since you are looking for APIs and say you are hooked into Excel 2003 that your application is hooked into the messaging system. The best approach I can think of would be to run Spyxx.exe to see the messages being sent during recalculation. If you are using Microsoft's SDK for C++ you have it already. If you are using some other platform, there may be an equivalent program for the application's language. Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=486771 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recalculation Done event?
Hi, Thanks Leith Ross and Ian for your replies. Ian: The recalculation could be triggered externally (by user, fo example) too. In such a case, is there a way to find if recalculatio is done? Leith Ross: The application in question uses COM via .net interop (C# that basically uses Excel APIs directly. We aren't listening to windo message loop. Sorry for using a potentially misleading wor ('hooked'). Thanks, Lavneet -- Lavneet Sing ----------------------------------------------------------------------- Lavneet Singh's Profile: http://www.excelforum.com/member.php...fo&userid=2894 View this thread: http://www.excelforum.com/showthread.php?threadid=48677 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recalculation Done event?
Could you set a value such that, when the sheet is calculated, another cell
changes to a known value? eg set A2 as =A1 then change A1. Then test A2 before data transfer. -- Ian -- "Lavneet Singh" wrote in message news:Lavneet.Singh.1yukxn_1132577702.7295@excelfor um-nospam.com... Hi, Thanks Leith Ross and Ian for your replies. Ian: The recalculation could be triggered externally (by user, for example) too. In such a case, is there a way to find if recalculation is done? Leith Ross: The application in question uses COM via .net interop (C#) that basically uses Excel APIs directly. We aren't listening to window message loop. Sorry for using a potentially misleading word ('hooked'). Thanks, Lavneet. -- Lavneet Singh ------------------------------------------------------------------------ Lavneet Singh's Profile: http://www.excelforum.com/member.php...o&userid=28942 View this thread: http://www.excelforum.com/showthread...hreadid=486771 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recalculation Done event?
Hi Lavneet,
Perhaps you could go by what's written in Excel's status bar. If Left(Application.Statusbar,18) = "Calculating Cells:" then 'still calculating End If Although I'm not sure if you'll be able to access the property while the workbook is busy calculating. Regards, Vic Eldridge "Lavneet Singh" wrote: Hi, Thanks Leith Ross and Ian for your replies. Ian: The recalculation could be triggered externally (by user, for example) too. In such a case, is there a way to find if recalculation is done? Leith Ross: The application in question uses COM via .net interop (C#) that basically uses Excel APIs directly. We aren't listening to window message loop. Sorry for using a potentially misleading word ('hooked'). Thanks, Lavneet. -- Lavneet Singh ------------------------------------------------------------------------ Lavneet Singh's Profile: http://www.excelforum.com/member.php...o&userid=28942 View this thread: http://www.excelforum.com/showthread...hreadid=486771 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to trap delete row event and hide column event? | Excel Programming | |||
user form-on open event? keydown event? | Excel Programming | |||
Too much recalculation | Excel Programming | |||
Recalculation | Excel Programming | |||
OnTime event not firing in Workbook_Open event procedure | Excel Programming |