Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default How to Determine When Calculations are Complete

I have some (many) equations in a spreadsheet. I have to change a
cell in the spreadsheet, which affects all the calculations, until
certain conditions are met. I check these conditions and change the
cell using VBA code.

My question: How can I be certain that calculations are completed,
before I change the cell value, which causes recalculation?

Please note that I cannot implement the formulae in VBA code, due to
user requirements.

TIA, Alan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default How to Determine When Calculations are Complete

You could put a message box at the end of your code, like this :

n = MsgBox("Calculations completed !",vbOkOnly)

--
If the post is helpful, please consider donating something to an animal
charity on my behalf.


"Alan" wrote:

I have some (many) equations in a spreadsheet. I have to change a
cell in the spreadsheet, which affects all the calculations, until
certain conditions are met. I check these conditions and change the
cell using VBA code.

My question: How can I be certain that calculations are completed,
before I change the cell value, which causes recalculation?

Please note that I cannot implement the formulae in VBA code, due to
user requirements.

TIA, Alan

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default How to Determine When Calculations are Complete

Paul,

Thanks for the suggestion, but I need to detect this in the VBA code,
not notify the user. In fact, it would be a nuisance to the user in
some cases.

Alan

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 905
Default How to Determine When Calculations are Complete

"Alan" wrote:
My question: How can I be certain that calculations
are completed, before I change the cell value, which
causes recalculation?


I would use the Worksheet_Calculate (in a particular sheet object) or
Workbook_SheetCalculate (in the ThisWorkbook object) event macro, depending
on your requirements. In VBA Help, enter calculate and sheetcalculate to
descriptions.

Be sure to set Application.EnableEvents = False within the event macro,
since you indicate that you will make changes that cause recalculation. Be
sure to use On Error to ensure that you set Application.EnableEvents = True
before exiting. Other precautions might apply.


----- original message -----

"Alan" wrote in message
...
I have some (many) equations in a spreadsheet. I have to change a
cell in the spreadsheet, which affects all the calculations, until
certain conditions are met. I check these conditions and change the
cell using VBA code.

My question: How can I be certain that calculations are completed,
before I change the cell value, which causes recalculation?

Please note that I cannot implement the formulae in VBA code, due to
user requirements.

TIA, Alan


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
auto complete only for one row down? Gringo Excel Discussion (Misc queries) 10 April 29th 10 05:13 PM
Using date format in the cells how determine percent complete boiseman62 Excel Worksheet Functions 2 January 27th 08 12:19 AM
Auto Complete elihue Excel Discussion (Misc queries) 2 January 18th 08 12:40 AM
MACRO IS NOT COMPLETE K[_2_] Excel Programming 2 January 4th 08 11:55 PM
formulas disappear after calculations are complete bldr Excel Worksheet Functions 2 December 30th 06 04:45 PM


All times are GMT +1. The time now is 01:31 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"