A novel method for measuring the vibrational state distribution of molecular ions is presented, based on the wavelength dependence of the photodissociation yield. By using a strongly repulsive upper state potential, the vibrational wavefunction is directly mapped onto the photodissociation spectrum. This allows an accurate analysis of the population of the separate vibrational states under the assumption that the photodissociation cross sections are known. Test measurements on Na + 2 created by associative ionization in the range v = 0 up to 7 yield a strongly peaked distribution with a fraction of 33% in v = 3. The accuracy is typically 3%. Rotational excitation has only a minor influence on the results. The method is especially suited for molecular ions with a small vibrational constant.