A quantum-mechanical model of elastic and inelastic electron scattering by a homonuclear diatomic molecule in its electronic ground state is presented. The model should be especially useful in the intermediate energy range (about 10-100 eV). It is applied to the calculation of differential and integral cross sections for elastic scattering and for excitation of the first, second, and third vibrational states of molecular hydrogen for impact energies in the 1-912-eV range. The theory assumes plane waves for the scattering electron wavefunctions; it includes electron exchange effects by use of the Born-Ochkur-Rudge approximation, and it incorporates an electron-H2 interaction potential containing a semiempirical polarization potential and a static potential which includes a semiempirical quadrupole interaction. These potentials are adjusted to agree with available ab initia calculations of these potentials. The effects on the cross sections of electron exchange and the scattering by the various potential terms are examined to elucidate which aspects are important for a detailed mechanism and for contrast with previous incomplete treatments. In particular, calculations using only the long-range interactions give results too small by a factor of 2 or more (when compared to the full calculation) for v'= 1 at E> 13 eV and for v'> 1 at all energies (v' is the vibrational quantum number of the molecule after the collision). The calculations of elastic scattering are compared with high-energy experimental differential cross sections and with theoretical and experimental low-energy cross sections. A formalism which treats the s and p scattering partial waves in the restricted distorted wave approximation while retaining the plane wave scattering approximation for all higher partial waves is also presented.