Using a wider inner tube I am switching from 700cx40 to 700cx32. I have a bunch of inner tubes that I bought for the old tires and are in the 40mm range, but I don't know anymore what the range is for each (I didn't keep the packages). Is there a way to tell? Or, if no, what can happen if I use a wider tube (say, a 35-xx or 37-xx tube on a 32mm tire)?

EDIT: OK, I see, the dimension is written on the tube. So, I have a 700 x35/43 tube. Is it safe to use it on 32?
Yes, it's perfectly safe to use the next larger size tube in a smaller tire. It's a common trick used by bike messengers to reduce the chance of flats. The only downside is a slightly heavier wheel since you're using more tube that you really need.