I need to measure water network from a source to multiple meters. Source point is connected to water main line, then water main line is connected to service line, service line is connected to meters. i have 4 shapefiles.......... source point, meters, water main line and service line. I have to calculate distance from source to each meter individually. can anyone help me in VBA (ArcGIS 9.2 or 9.3).
Honestly, your best bet is to use Network Analyst if at all possible. You should be able to get this to do all the heavy lifting for you.
If you have to do it yourself (no license available), then you'll need to model the connections / intersections and flow direction so that you can implement your own trace. You could start at the source and do a recursive depth-first solution of all the meters, or iterate over the meters and trace back to the source.