Distance and metallicity limits of high-velocity clouds.