I think the 40gb drive is a little thicker than the 20gb drive, and it won't fit. Not positive about that, but you probably want to verify that before you spend any money.
Source of this speculation: An ongoing post from someone looking for an H140 so he could do a mod, and that person didn't want the H120 because it didn't have as much space. I think that eventually turned into the successful CF card mod.