We calculate transition amplitudes and probabilities between the coherent and Fock states of a quantum harmonic oscillator with a moving center for an arbitrary law of motion. These quantities are determined by the Fourier transform of the moving center acceleration. In the case of a constant acceleration, the probabilities oscillate with the oscillator frequency, so that no excitation occurs after every period. Examples of oscillating and rotating motion of the harmonic trap center are considered too. Estimations show that the effect of excitation of vibration states due to the motion of the harmonic trap center can be observed in available atomic traps.