The first digit has 8 choices, the second digit has 9 choices because you can't repeat digits but you can use 1 or 0 now, the third digit has 8 choice, the fourth digit has 7 choices, and the last digit has 6 choices. So 8*9*8*7*6= 24192 five-digit codes.
Hope it helps!