Quote Originally Posted by odamsr
But it could be any numbers from 0-9. Would you have to create a function for each? I thought about testing positions 1 & 2 to see if they are the same and if they aren't exit the function and if they are test position 2 & 3 and then repeat the process. Would that work?

Thanks
Shannon
I just took what Martin posted, and put it into a Function. Just enter the number string you wish to test in text1.text
VB Code:
  1. Option Explicit
  2.  
  3. Private Function AreNumbersAlike(plngCheckNum As Long) As Boolean
  4. Dim lngIndex As Long
  5. Dim bDifferent As Boolean
  6.    
  7.     For lngIndex = 1 To 9
  8.         If Mid$(plngCheckNum, lngIndex, 1) <> Left$(plngCheckNum, 1) Then
  9.             bDifferent = True
  10.             Exit For
  11.         End If
  12.     Next
  13. AreNumbersAlike = bDifferent
  14. End Function
  15.  
  16. Private Sub Command1_Click()
  17. If AreNumbersAlike(Val(Text1.Text)) Then
  18.    MsgBox "They are different"
  19. Else
  20.    MsgBox "They are all the same"
  21. End If
  22. End Sub
Modify as necessary.