sivag75:
The shape element should have same Z value in all of its vertices
No. The shape must be planar. That means that all its vertices lie on the same plane. That plane does not need to be the XY plane, nor any other.
In VBA, you can test for planarity using the .IsPlanar property.