I used an older 17-35/2.8 L lens on my 40D for a while, and occasionally my new 16-35/2.8 Mark II. I just don't find that focal range to be quite right for some reason (it's the equivalent to about a 28-55mm lens on a full frame camera.)
So I got the Canon 17-55/2.8 IS lens. Sure, it's an EF-S lens, so it won't work on any larger-sensor bodies, but it seems to be a good fit for the 40D. I just got back from an assignment to shoot the senior exec where I work, and the 40D and this lens got a good workout. I had one shot where I had to set a shutter speed of 1/15 and shoot hand held (to get the background ambient light to balance with the flash.) I could have used a 1-D Mark II and my 24-70, which is a great combo, but I chose to use the 40D/17-55 just for the IS. Hand held at 1/15 is doable, mostly, but I really don't need to screw up the senior guy's portrait. So the combination of f/2.8 max aperture and IS is a good one.
And for a walk-around lens, it's great. Much lighter than the 1D2/24-70 combo, and covers the same range with I.S.