The Ex-Mrs. Bradford (1936), directed by Stephen Roberts.
Dr Bradford is divorced but not very divorced. His wife drops by for some mischief; she's a mystery writer who thinks of herself as a real sleuth. We don't see any actual evidence of her writing so maybe she's just mental.
They are caught up in a tale of a dead jockey, tough gamblers and missing money. I lost track of the plot.
William Powell is a favorite actor from that period. Not what you would call handsome, he is always smart, funny and distinguished. Not to slight Jean Arthur, always cute as a button.
Also with James Gleason as the unflappable Inspector, and Eric Blore, who cornered the market on loyal but swishy butlers.
Safety tip: if you think a gangster is rifling your dark office at night, don't stick a finger in your pocket and charge in yelling "Stick 'em up!"
Some of the scenes have better lighting than I expect from a 1936 film. J. Roy Hunt is the cinematographer. I see he has credit for I Walked with a Zombie (1943) and 182 other titles.
Warner Archive title, available for rent from ClassicFlix.