ちなみにVBAで三項演算子は
IIf(Expression, TruePart, FalsePath)
と書く。問題となったコードがこちら
Sub ConvertToCurrency(ByVal value As String)
Dim price As Currency
price = IIf(Trim(value) = "", 0, CCur(value))
'-- 以下略
End Sub
IIf(Expression, TruePart, FalsePath)
と書く。Sub ConvertToCurrency(ByVal value As String)
Dim price As Currency
price = IIf(Trim(value) = "", 0, CCur(value))
'-- 以下略
End Sub