PC Review


Reply
Thread Tools Rate Thread

How to Determine When Calculations are Complete

 
 
Alan
Guest
Posts: n/a
 
      31st Dec 2009
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 With Quote
 
 
 
 
Paul
Guest
Posts: n/a
 
      31st Dec 2009
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
>
> .
>

 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      31st Dec 2009
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

 
Reply With Quote
 
Joe User
Guest
Posts: n/a
 
      31st Dec 2009
"Alan" <(E-Mail Removed)> 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" <(E-Mail Removed)> wrote in message
news:6f164237-6e33-4a1b-9d9d-(E-Mail Removed)...
>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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using date format in the cells how determine percent complete boiseman62 Microsoft Excel Worksheet Functions 2 27th Jan 2008 12:19 AM
formulas disappear after calculations are complete =?Utf-8?B?Ymxkcg==?= Microsoft Excel Worksheet Functions 2 30th Dec 2006 04:45 PM
Determine the cause of a complete freeze =?Utf-8?B?c2tpd2k=?= Windows XP Performance 1 31st Mar 2006 09:36 AM
Perfoming calculations on answers from pervious calculations =?Utf-8?B?S2FybCBFdmVyZXR0?= Microsoft Excel Misc 1 6th Oct 2004 02:47 PM
HELP!need to determine price based on time to complete using Min. Hour. And days Tiffany Microsoft Excel Worksheet Functions 10 24th Feb 2004 08:04 PM


Features
 

Advertising
 

Newsgroups
 


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