We just moved, so I had to do this (albeit on a first gen) & had forgotten how much fun it is.
Most if not all modern Garage Door openers use "rolling codes" so you will need to do this in 2 steps:
1) first your Home link in the HL has to learn the code from the actual physical garage door opener button which you hold 1-3 inches from visor while doing: This is detailed in the manual, but you basically pick which button you want to program on the Home Link, then press for instructed amount of time while pressing same button on garage door opener. When proper blinks sequence on visor occurs(I'm not going to post the one for my 2001, in case it's different for you 2nd gen guys), then your HL has learned the code. BUT you are not done, & this is where people go astray often.
2) now you need the actual garage door opener motor/receiver to learn the code. Climb ladder, find "Learn" button on garage opener box, press it, run back to HL - you have 30 seconds - and press & hold the visor button you just programmed. Usually something non-dramatic happens, like your garage opener lights flash once, or go on/off or out. If that happens, test it:
3) press newly minted Home Link button & see if garage door does something - but here's my other tip - you need to actually hold it in for like a second or two. These buttons aren't (at least on mine) ever the kind you just give a quick microsecond press & release. You have to seriously hold it for a full second before it does anything. I don't think everyone knows that...
Hope this helps others, since yours is up & running, or in case your wife (bward76) is on vacation & you change openers
Geoff