Why does garage remote not work after replacing the remote/batteries and pairing it up again?
If it works when you're standing under the garage door opener, that tells you that there's nothing wrong on either end (the remote and the opener). It's likely that interference is overwhelming the signal from the remote when you use it from a distance.

One common cause of this interference is certain kinds of light bulbs. Make sure that the light bulbs in your garage door opener are approved for use with garage doors (check the garage door opener's manual). You can buy low-interference light bulbs specifically for garage door openers from your local big box hardware store. They are more expensive than regular light bulbs, but may be worth it if they fix the problem.