Function isTypeValueEqual(a, b) As Boolean
If VarType(a) = VarType(b) And _
a = b Then
isTypeValueEqual = True
Else
isTypeValueEqual = False
End If
End Function
つまり型が違うときは等価ではないので、型が等価かどうかを判定する。
これを勝手に異型不許容等価演算と呼ぶことにする。
これをUDF、ユーザー定義関数化しているので異型不許容等価関数ということにする。
実際は文字列型は文字列型に寄せる必要があるため、完全に厳密等価演算子というわけには行かないが、基本の異型不許容等価演算の部分はこれで行けるかもしれない。