Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacement for VB 's IIF Function in VBscript

Language Reference

Replacement for VB 's IIF Function in VBscript

by  Chance1234  Posted    (Edited  )
I cant take credit for this(www.4guysfromrolla.com they can), and i kicked myself when i found it on the web.

To be able to use the VB iif function in vbscript all you need to do is create your own iif function.

Ready for this ? this is how just add

function iif(psdStr, trueStr, falseStr)
if psdStr then
iif = trueStr
else
iif = falseStr
end if
end function


simple ey!


Chance
www.5ylac.s5.com
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top