What was the name of the old film where a man was wrongly accused of committing a crime and ended up being handcuffed to a woman he met on a train?

This sounds like The 39 Steps, from the book by John Buchan, which has been filmed in several versions. Probably the most famous version is the Alfred Hitchcock directed movie in 1935, starring Robert Donat and Madeleine Carroll. The hero, Richard Hannay, gets involved in a murderous spy ring and is wrongly thought to have committed murder, but it all ends well.