Thread: Do Until Code
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Do Until Code

One way:

Do Until Range("A1").Value = 0
ActiveSheet.Calculate
Loop

Note that this is a dangerous piece of code since nothing internal to
the loop changes A1.

Also, rounding errors can sometimes make even proper loops fail. Better
might be:

Const epsilon As double = 1E-10
Do Until Abs(Range("A1").Value < epsilon
ActiveSheet.Calculate
Loop

In article ,
"Peter" wrote:

Can anyone help with a piece of Code that will recalc the sheet until a
certain cell contains a certain value e.g.:-
A1 = 0

TIA
Peter