In ArcGIS, I have only a point layer relating to a hydrography network's pour points. Now I want to write code in VBA that selects a point from this layer, then highlight the closest points to this point. One of this points must be downstream of the desired point and another point must be upstream. In this work, I must measure the distance between two points on the network, not a direct distance between two points. Also both points are related to a layer. Also the program must be able to determine one of points in downstream and another points in upstream. I don't know how to determine the closest points on the network. Please help me again.