For what it's worth...wide format printers are fantastic toys, and I think they force you to improve your "game" more than a new camera might.
I've been printing with wide format printers (initially an Epson 7600, now an HP Z3100) for five years, from digital capture starting with a Canon Eos-1Ds, then the mk II and now the mk III. I've also used a 6 megapixel 10D a few years back.
As a few other posters note, how big you can go depends in part on the character of the image. Lots of fine detail, like leaves on trees, means you can't make as large a print without digital artifacts or mushy detail rearing their ugly head. In my experience, with perfect technique at ISO 100, optimally sharpened images from the original Eos-1Ds can be printed up to about 20 x 30" at most. You can go bigger with simple graphic images lacking fine detail. The 40D has a more recent sensor with nearly the same resolution, so I would guess it can produce a file that can be printed to a similar size, though it puts more demands on the lens with those little pixels. I found the 24" wide format printers a good match, because 16 x 24" prints look terrific. Also, stitched panoramics work great; portrait-format captures stitched side to side will easily permit prints 24" high by as long as you want.
The 21 megapixel Eos-1Ds III produces files that can easily be printed 24 x 36" with the usual proviso that it requires excellent glass, solid tripod, perfect technique etc. At this resolution, diffraction issues are important and will limit obtainable sharpness at apertures smaller than about f:13 or even f:11. Some photos from the 16 megapixel 1Ds II can withstand printing at 24 x 36", but it's pushing the limit. As always, it depends on the image; I have a photo of Niagara Falls taken with the old Eos-10D at 6 megapixels that looks fabulous at 20 x 30", because it's dominated by big spashes of green water, white foam and blue sky.