The substrate lattice structure may have a considerable influence on the formation of quantum well states in a metal overlayer material. Here we study three model systems using angle resolved photoemission and low energy electron diffraction: indium films on Si(111) and indium and lead on Si(100). Data are compared with theoretical predictions based on density functional theory. We find that the interaction between the substrate and the overlayer strongly influences the formation of quantum well states; indium layers only exhibit well defined quantum well states when the layer relaxes from an initial face-centred cubic to the bulk body-centred tetragonal lattice structure. For Pb layers on Si(100) a change in growth orientation inhibits the formation of quantum well states in films thicker than 2 ML.