This is a simples question to solve, let's illustrate our situation as follows:
Once we know the area code if formed by the digits NYZ above we can see a specific situation. Imagine the N digit is 2, so Y can be 0 or 1, and if Y is 0 Z can be 1,2,3,4,5,6,7,8 or 9 but if Y is 1, Z can be 2,3,4,5,6,7,8,9. So we can see, just for the situation N=2 we may have

we have 17 possibilities. Above, for the first term, we have: 1 means one possibility for N (N=2), the other 1 means 1 possibility for Y (when Y=0) and 9 means 9 possibilities for Z (1,2,3,4,5,6,7,8,9). For the second term, we have: 2 means one possibility for N (N=2), the other 1 means 1 possibility for Y (when Y=1) and 8 means 8 possibilities for Z (2,3,4,5,6,7,8,9). But this is just the calculation for one situation where N =2. So we can extend this situation for all other values of N (all the 8 values from 2 to 9) and we have the following calculus:

So now we know there are 136 possibilities for these combinations of NYZ. But we are not finished yet because there are also special situations, for call operators where N=0 (1*1*9=9) and long-distance calls where N=1 (1*1*8 = 8). Also, we have the special numbers 800 and 91 is means 2 other possible solutions. So, now we can add all our possibilities:

So, the number of possible code areas is 155.