Dim pGeo As IGeometry
Set pGeo = [Shape]
Dim pPolyline As IPolyline
Set pPolyline = pGeo
Dim pCurve As IPolycurve
Set pCurve = pPolyline
dim pt as IPoint
set pt = new Point
call pCurve.QueryPoint(esriNoExtension,0.5,True,pt)
dim x as double
x = round(pt.X,5)

 

CenterX = x