An initial value investigation is made of the motion of an incompressible, viscoelastic, electrically conducting Oldroyd-B fluid bounded by two infinite rigid nonconducting plates. The flow is generated impulsively from rest in the fluid due to rectilinear oscillations of given frequencies superimposed on the plates in their own planes in presence of an external magnetic field acting transversely to the plates. The operational method is used to derive exact solutions for the fluid velocity and the shear stress on the walls. The quantitative evaluation of the results is considered when two plates oscillate in phase but with different frequencies. The results are shown graphically for different time periods of oscillations of the plates which represent the cases: (i) the lower plate oscillates with a time period less than the upper, (ii) both the plates oscillate with the same time period and (iii) the lower plate oscillates with a time period grater than the upper. It is seen that the effect of fluid elasticity on the flow depends on the advancing and retarding motion of the plates. On the other hand, the magnetic field damps the fluid motion for all values of the time period of oscillations of the plates. The drag on the plates, for small and large time, are shown graphically when the time period of oscillation of the lower plate is small. For small values of time, the drag on the lower plate is negative with the amplitude decreasing continuously till the oscillations occur from moderately large values of time. Similar phenomenon also occurs for the drag which is positive at the upper plate for small values of time. In all cases, the amount of drag on the plates increases with the increase of the elasticity of the fluid and the magnetic field. Some particular results for the fluid velocity are derived as special cases of the present solution.