If the key has already been programmed to the car, the method you are speaking of will work. I would make sure the LEDs on the remote are flashing when you press the buttons. If they don't flash you may have a faulty remote or the batteries are not installed well.
If the remote is new to the car, you will need to have a scan tool to program it. Normally dealerships charge about $25 to program, you may be able to find an independant who will give you a better deal.
If this was helpful, please select "accept". Thanks.