The problem is in here:
For x = 2 To (y - 1)
If y / x = Int(y / x) Then
Exit Function
End If
Next x
You're exiting the function when you find a number that can divide into y.
You don't want that: you simply want to stop the loop.
Is your attempt to print the first 100 primes? There's no reason to pass y
to the function, and your loop
For Prime100 = 1 To 100
isn't really appropriate.
What you want is a loop of odd numbers starting at 3, and check whether each
number is prime or not.
If it's prime, print it out and increment the number found by one.
Once your number found hits 100, end the routine.