I think someone already made a movie with this exact premise, but I don't remember the name of it. Something by Alfred Hitchcock, maybe?
Edited to add: I found it!! "The Trouble with Harry," by Alfred Hitchcock. One of his few comedies.
As is EVERY Hitchcock movie I ever saw! There are humorous little skits or even sub-plots in pretty much all of them but this one is a straight screwball comedy. Very well written, very well played and very 1950s Technicolor. Ted Kotcheff's "Weekend at Bernies" is an over-the-top version of that movie. Pretty much shyte, except for the plot and the guy who plays the dead guy, he deserved an Oscar.
Edited to add: I found it!! "The Trouble with Harry," by Alfred Hitchcock. One of his few comedies.