The A330 and A340 are different type ratings, at least they are under JAR regulations.
A330-200 and A330-300 are under a common type rating and pilots are qualified to fly both, the A340-200/300/500/600 are also under a common type rating but pilots who are qualified to fly the 200/300 aircraft need a differences course to fly the 500/600, probably due to the changes to the Flight Control laws, FMS and Fuel systems I would imagine. Same for pilots going from 500/600 to 200/300.
Airbus claim that pilots can be trained from A320 to A330 in 8 working days, from A330 to A340 in 3 working days, and from A340 to A330 in just one day - I haven't the foggiest idea how realistic that is though, any pilots/trainers care to comment?
Also, although the A330/A340 cockpits LOOK the same, the systems appear to be quite a bit different (to me anyway) - I know there are a couple of ex Sabena A330/A340 pilots who post in this forum occasionally, maybe they could give us a quick rundown of the major differences between the two aircraft, apart form the obvious that is.
Statistically, people who have had the most birthdays tend to live the longest.