オブジェクトがNothingかどうかを判定するには「=」ではなく「Is」を使います。> If sArray = Nothing Thenの部分はif sArray Is Nothing Thenでよいのでは・・?