Private Sub check_Click()
Dim s as string, ss as string, s1 as string, s2 as string
Dim i as integer, bz as integer
bz = 0
For i = 1 To Len(s)
ss = Mid(s, i, 1)
If ss = "-" Then
bz = bz + 1
ElseIf bz = 1 Then
s1 = CStr() + s1 ‘Cstr函数是在str的基础上去除前导空格
ElseIf bz = 2 Then
s2 = s2 + ss
End If
Next i
If Then
Label1.Caption = "符合标准"
Else
Label1.Caption = "不符合标准"
End If
End Sub