Error: Run-time error: Object invoked has disconnected from its clients

Solution or Workaround

Error Message

This error is returned when attempting to use the BuildIndices method:

"Run-time error: Object invoked has disconnected from its clients".


The BuildIndices method of the Geocoder can corrupt the .gc file if great care is not taken. The size of the .gcd file will increase each time the code is run, before finally failing with a run-time error (generally on the fourth run).


Use the IndexStatus method to determine if indices have already been added. Then, use the BuildIndices(false) method to build the indices. The placement of the IndexStatus check is crucial; it needs to occur after the Geodocer has been set up. The proper procedure is:

1. Set up standardizer, add to Geocoder
2. Set up VariableField array(s) on Geocoder
3. If IndexStatus <> mgStatusExists then AddIndices
4. BuildIndices(False)