A writ of venditioni exponas for the sale of any goods and chattels, lands and tenements, taken in execution by virtue of a writ of fieri facias, may be issued and directed either to the sheriff in office, or the sheriff's immediate predecessor (he or she having seized and taken in execution such goods and chattels, lands and tenements) at the election of the plaintiff in the execution; and all proceedings had, by virtue thereof, shall be valid in law.