Grey resigned in 1834 and Melbourne became Prime Minister . After Lord Grey resigned as Prime Minister in July 1834 , the King was forced to appoint another Whig to replace him , as the Tories were not strong enough to support a government .