Thread: Use of IIF
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mark Bigelow Mark Bigelow is offline
external usenet poster
 
Posts: 55
Default Use of IIF

I don't typically like IIF or single-line IF statements because of
breakpoints. You can't set a breakpoint inside of a single-line or IIF
statement. So, if I had code like this:
Do until something
If condition1 Then
action1
Else
action2
End If
Loop

I could set a breakpoint at the action1 line and the code wouldn't stop
until that condition was met. However, with this:

Do until something
IIF(condition1, action1, action2)
Loop

I can't stop the code anywhere inside the IIF statement. Now, if that's
not true and somebody knows how, please let me know. Other than that, I
can't think of any real problems with it.

Mark

---
Mark Bigelow
mjbigelow at hotmail dot com
http://hm.imperialoiltx.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!