vauxhall vectra key code

i have a vectra on a 98 which a got in p/x an the key will not lock the doors but starts the car there is life in the battery in the key fob .
what i want to know is how i get the key to work the locks again i no there is a way of putting the key in the ignition an pressing it but how exactly can some one please help thankyou
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.