Compared to the jump from D40x the differences between the D800 and D800E is minimal. D800e offers a little extra resolution that will only be visible when it is used with the recommended lenses under optimal conditions.
Although you can use DX lenses with D800/E the viewfinder image will be smaller and more difficult to work with than if you upgraded to another DX camera (BTDT). If you do not plan to invest in FX lenses then seriously consider one of the new generation DX cameras (D3200, D5200 and D7100). They are now several generations ahead of the D40X. The biggest differences you will notice are increased resolution, much better high ISO capability and improved AF systems. They all have a lot of new features that were not present on the D40x.
As others have said this switch only makes sense if you are prepared to invest in the recommended FX lenses for D800/E, otherwise D600 or the newer DX models will serve you better. In addition to lenses, the D800 files are huge and modern software/hardware is also recommended. IIRC the D40x uses CF cards. D800/E has one CF card slot but it performs best with large capacity high speed CF and SD cards that were not available when the D40x was on the market. so include the cost of new cards if yours are not suitable. D800 RAW files vary from 45 Mb to 70Mb depending on settings. Jpeg files are large too. Any card smaller than 4 Gb fills up very fast.
There is quite a significant difference in the menu system and controls between the D40x and the D800/E which will take some time to get used to. If you rely on the scene modes, these are completely absent on all the Dx00 models and you will have to take much more manual control of your settings. However, if you are already normally using the P,A,S,M modes on D40x instead of the built-in scene modes then the learning curve will be a lot less daunting and the upgrade will make a lot of advanced features available to you.
Be aware that the D800/E is a much larger heavier camera than D40x (approximately double) and so too are the appropriate lenses.
finally, accessories like infra red and cable remote releases that you may have for the D40X will not work on D800/E and you should factor in for new ones if you use these.