I've got both and use both. Yes, it's worth mentioning that, in order of importance, mics are going to come in below the vocalist (and technique), and the room and even the mic placement (that is, bad mic placement can probably do more damage than a bad mic), but, by varying technique, experimenting with placement in the room, taking furniture like sofas and stuff in to account, you should be able to get good tracks with either mic, even in a sub-optimal room.
The SM7b is nice for when you have a loud source and you want to smooth out some rough edges a little. The output of the mic is low -that's *not a problem when mixing!* (if you're going digital, because you can just turn it up in the mix), but, depending on your signal chain, it can be annoying while tracking, because if you don't have a good way to boost the track in the monitoring headphones, the vocalist won't be able to hear it, and that may affect performance - you may be tempted to turn up the gain on the recording itself (which will have the effect of raising monitoring level), and actually go hotter than you needed to. Anyway, just a word of warning - this problem doesn't normally affect *real* studios, because they have full featured signal/monitoring chains and know how to use them, but it can cause issues in a home environment with folks like me.
The 4040 is a great mic, in my opinion. It's more detail-friendly than the SM7b, to be sure, but still somehow smooths away some harshness. If you have a high-quality, non-shouting/spitting source, you can do very well with one of these.
Can you get both?
PS, as far as nice dynamics go, there's no perfect substitute for the SM7b, and other dynamics which perform as well are usually more expensive, in my experience. That said, depending on the source and what you're going for, certain handheld dynamics (e.g., SM57, can do just fine)