It's actually more complicated....
Although you
could be eligible to earn miles basd on NZ being the operating carrier, whether you
will earn miles, or not, depends on the fare class that your ticket is flown in. There is a list of eligible fare classes here:
http://www.united.com/CMS/en-US/mark...spx?ItemId=379
Note that there are different eligibility for domestic, trans-Tasman, and International trips. Also note that the fare class you purchase through VA may map into a different fare class on NZ.
You'll have to call into NZ to find the actual fare class you'll be flying - if you want to know in advance (if, for example, you have other mileage options with VA or SQ that you might credit a fare class that would not get credit from UA). Or you can just take your chances and put in for mileage credit after your trip - as long as you don't get the flight credited to another program, which would mean not putting in any other mileage program number on that leg of the trip.