Well it depends on the point of the exercise. This sounds kind of like a homework assignment, so they might want you to do some math to figure out if the number is prime. One other way to do it would be to declare an array of all primes under 100 and see if the number is in the list:
Code:
Dim primes() As Integer = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97}
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim somenumber As Integer = Integer.Parse(textbox1.text)
If primes.Contains(somenumber) Then
MessageBox.Show("Prime")
End If
End Sub