No it doesn't have to be the exact code, but there are some differences to look out for. You have quite a range of suitable donors from mk2 Golf's to mk1 Golf's, Scirocco's etc.
Things to look for will be: reversing light switch, there are various types. Most switches are a 2 pin connector and the switch is removeable.......but there is also the type that is built into the gearbox and has special plug.
16v and 8v gearboxes are different, I think you'll find the input spline on the 16v box is larger. You can still use a 16v box but you will need to swap for a 16v clutch too.
If you get your gearbox from a mk1 or scirocco then you'll find the driveshaft flanges are smaller........not a problem as you can swap them over.
Another donor option is to look at Maestro's and Montego's.......they use the same box, but again you will need to swap the flanges over.
Gearbox code is underneath, you'll see a flatted off section on the clutch housing.
If you find one and aren't sure, let me know the part number/code and I'll soon be able to tell you as I can use my ETKA to check interchangeability.