Thread: WEND in VBA
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default WEND in VBA

While Abs(kw - Price) 0.00005

As a side note, it is a little unusual here because both kw & Price do not
get changed in the loop.
It appears it could cause an endless loop.
Usually, one or both get change in the loop so that eventually kw-Price
falls below .00005.

--
Dana DeLouis
Windows XP & Office 2007


"Dave F" wrote in message
...
Very helpful, thanks.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Jim Thomlinson" wrote:

While...Wend is just one of the control flow structures. I personally
prefer
Do...Loop but there is nothing wrong with While...Wend. Check out this
link
on the different control flow structures...

http://msdn.microsoft.com/library/de...7ecff00da4.asp
--
HTH...

Jim Thomlinson


"Dave F" wrote:

What does WEND mean in VBA code, e.g.:

While Abs(kw - Price) 0.00005
T3 = T1 + (Price - k1) * (T2 - T1) / (k2 - k1)
T1 = T2
k1 = k2
T2 = T3
k2 = (-Application.PV(T2, n, Cpn, 100) + Cpn) / (1 + t)
^ t
- sz
Wend

Does it merely mean While End, sort of like End If?

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.