I did the same upgrade two years ago and have barely touched the 40D since (which is a shame, because it's a fine camer). The IQ on the 5D is significantly better, and ultimately that is what matters most to me.
Things you will notice in the switch - these may or may not matter to you:
the 5D is much slower (both fps and overall responsiveness)
no liveview on 5D
no self-cleaning sensor on 5D
5D has older, clunkier menu system
LCD much nicer on 40D than 5D, even though resolution is similar
Of course, you will lose the APS-C "reach" - this is the only reason I pick up the 40D now
Enjoy the upgrade. I think the 5D is still a perfectly viable camera, assuming it is in good condition. Of course 5D2 would be better, but a significant price gap persists ($500-ish vs. $1200-ish used).