VB Code:
Const TESTDATA = "999999999" Dim lngIndex As Long Dim bDifferent As Boolean For lngIndex = 1 To 9 If Mid$(TESTDATA, lngIndex, 1) <> Left$(TESTDATA, 1) Then bDifferent = True Exit For End If Next If bDifferent Then MsgBox "They are not the same" Else MsgBox "They are the same" End If




Reply With Quote