Yes old post but this needs to be corrected and fully answered for postarity
Yes they based on the same foundational frame. the only difference between the SW9VE and the SW40VE is on the SW9VE there are small plastic protrusions that run vertically in thee mag well. just pull the slide and mag off and look through the magwell (pictures below) also you see it and the mag catch/release is a little different.
So first a disclaimer, i'm not responsible for misuse or medication your firearm in any way, and if you damage your equipment or body and life that is on you. i have put a 9mm slide on an SW40VE frame and just swap out the mag catch/release to a 9mm version and yes the magazine has a little slack around it but all the ones i have run this way, which is getting to in the 1000's of rounds, have run just fine. no feeding issues, ejection issues, etc...
Now the other way around, using a SW9VE frame, i had to do the same as above an add one more step. i had to file down those 3 vertical plastic protrusions i show as best i can in the photo below. Otherwise, if one were to force a .40 cal mag into it (which is possible) it becomes extremely hard to pull it back out.
I have personally done it with the V, E, VE, GP, and P. i've even put the 1/2" longer "F" 9mm and .40 cal versions on the 1/2" shorter VE versions and they work too, look silly and are open to debris getting in the bottom gap in the slide. i wouldn't trust this combo with my life but i do trust the others with it) so going both ways with it on just about every model, minus a couple, and have never had a single issue.
i apologize before hand, i'm no photographer and these are a little dusty but you should be able to make out at least one of the 3 extra tabs in the magwell that if filed down some will allow a .40 cal magazine slide in and out with ease. and you just need to insert the correct mag catch for the caliber you are using and your all set.
pic
HERE
same pic: