比如说:刘海莉 05
庞莹 36
陈奋飞10
黄源 02
曾仁臻36
孙晓敏12
焦海辉24
穆冰芳102
陈琳10
李照45
王楷35删除不含序号10的行,注意102是个整体.谢谢

解决方案 »

  1.   

    Private Sub Command1_Click()
        Dim strTest As String, strTest1 As String
        strTest = "我10好"
        strTest1 = "123106"
        MsgBox IsCheckString(strTest)
    End SubPrivate Function IsCheckString(ByVal strCheck As String) As Boolean
        Dim intStart As Integer, intEnd As Integer
        intStart = InStr(strCheck, "10")
        If intStart > 0 Then
            If IsNumeric(Mid(strCheck, intStart - 1, 1)) Then
                IsCheckString = False
                Exit Function
            Else
                If IsNumeric(Mid(strCheck, intStart + Len("10") + 1, 1)) Then
                    IsCheckString = False
                    Exit Function
                End If
            End If
        Else
            IsCheckString = False
            Exit Function
        End If
        IsCheckString = True
    End Function