His mother Janet Rannie was a sister-in-law of the influential Lord Melville, through her sister Elizabeth, and his father, Archibald Cockburn, was Sheriff of Midlothian and Baron of the Court of Exchequer. He was educated at the Royal High School and the University of Edinburgh.
his mother janet rannie was a sister-in-law of the influential lord melville through her sister elizabeth and his father archibald cockburn was sheriff of midlothian and baron of the court of exchequer he was educated at the royal high school and the university of edinburgh