Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default 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
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
How to trap delete row event and hide column event? Alan Excel Programming 3 April 26th 05 04:25 PM
user form-on open event? keydown event? FSt1[_3_] Excel Programming 2 August 5th 04 02:26 PM
Too much recalculation Diane Meade[_2_] Excel Programming 2 May 26th 04 07:19 PM
Recalculation Anna[_6_] Excel Programming 1 May 24th 04 11:15 PM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM


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

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"