Need the year and model VW to answer the question.
You normally do not have to reprogram the key when you replace the battery. If you do you will have to contact your VW dealer.
go to radio shack
how do i reset key fob for a vw golf 2001 how do i reset key fob for a vw golf 2001
battery can be bought at any Radio Shack.
http://www.riskin.org/vwkey/- very simple instructions with pictures.
Volkswagen Key Disassembly
Note that crack in the fob on the logo side. Make sure the key is folded. Firmly grasp each side of the crack and pull so that it will pull into two pieces. The battery is in the piece with the buttons on it. On the side opposite of the buttons, detach the cover holding the battery. This should be the side with the VW part number. Replace the battery and assemble the key back together.
Usually the key FOB has a trunk latch, but if the battery runs out or you don't have a key FOB, check next to the drivers door, next to the gas release lever, there should be a trunk release lever.
What Model and Year is your vehicle? For a VW Golf (Mark IV 2000), Place the fob with the VW logo upwards. Prise apart the sleeve with the aid of a screwdriver along the join in the middle of the fob. One section has the key, the other has the transmitter. Gently prise open the transmitter top to access the battery which is in the lid. The battery can be easily removed, but note the orientation. A plus (+) sign is shown on the lid to indicate the way the new battery should be installed.
Find the little slot on the side of the fob near the PANIC button. Insert a small flat blade screwdriver or a paper clip into the slot and twist to separate the 2 halves of the fob. Replace the 2 CR 2016 3 volt batteries and snap the fob back together.
dealer has to do this. A good locksmith may be able to also.
There is a guide, complete with pictures, at the following link: http://forums.vwvortex.com/zerothread?id=3532084 All credit goes to the creator of the guide, which is listed on the page. Cheers, Jerry