If you use Variant you can use IsError instead of checking for 0.