7,785
社区成员




Dim i As Long
i = InStr(1, Text, vbCr)
If i <> 0 Then MsgBox "有回车"
Option Explicit
Sub CheckText(ByVal Text As String)
Dim a() As String
If InStr(1, Text, ":") <> 0 Then
a = Split(Text, ":")
Text1 = a(0)
Text2 = a(1)
End If
End Sub
Private Sub Text1_Change()
CheckText Text1.Text
End Sub
Private Sub Text2_Change()
CheckText Text2.Text
End Sub