The above code is close, but has a few problems:
1) The 2nd line should be:
Public Function CheckVIN (VIN As String) As Boolean
2) The 1st If statement should be:
If i <> 8 Then
3) The 2nd If statement has parenthesis that it should not have:
If Temp = 10 And Mid(VIN, 9, 1) = "X"...