Is there a built in VB function to ensure the following:
Dim price
Dim subsidy
if price - subsidy <= 0 then
price = 0
end if
In practical terms, I've lots of other things going on to calculate price, so I want to simplify this to:
Dim price = calculatedPrice - subsidy
and wrap that into some VB formatting that ensures if price
ever becomes negative it's forced to zero.
I'm thinking that a simple type conversion might do it, but am not sure which type would suit.