With out the model number I can only provide general information.
: Most key less entries have a program and operate switch underneath the face plate of the pad.
Look for screws or clips that may need to be removed on the keyless entry pad.
Use a flat head screw driver to pry the face plate off.
Look for a switch labeled program on one side and operate on the other.
: Older models will have a series of switches that you will use to program the new code.
Turn the switch to program and enter the code of your choice.
Turn the switch back to program and enter the code to ensure the garage door has been programmed.
Once you verify you have the right code and it is working properly, put the face plate back on the entry pad and replace all the screws that may have been removed.
If you are still having problems programming the garage door opener please resubmit your question with the model number of the key pad or the model number of the garage door opener head that uses that opener. You should see the model number under the face plate of your key pad and under the lens light of your opener.