We study the transverse momentum distribution of vector mesons produced in ultraperipheral relativistic heavy ion collisions (UPCs). In UPCs there is no strong interaction between the nuclei and the vector mesons are produced in photon-nucleus collisions where the (quasireal) photon is emitted from the other nucleus. Exchanging the role of both ions leads to interference effects. A detailed study of the transverse momentum distribution which is determined by the transverse momentum of the emitted photon, the production process on the target and the interference effect is done. We study the total unrestricted cross section and those, where an additional electromagnetic excitation of one or both of the ions takes place in addition to the vector meson production, in the latter case small impact parameters are emphasized.