Private Sub Command1_Click()
If Text1.Text = "" Then Exit Sub
Dim word As Variant,s As String
Dim k As Integer,maxw As String,n As Integer
s = Replace(Replace(Text1.Text,","," "),"."," ")
s = Replace(Replace(s,","," "),"."," ")
s = Replace(s,vbCrLf," ")
s = Trim(Replace(s," "," "))
If s = "" Then Exit Sub
word = Split(s," ")
n = UBound(word)
For k = 0 To n
If n = k Then Exit For
If Len(CStr(word(k + 1))) > Len(maxw) Then
maxw = word(k + 1)
End If
Next
MsgBox maxw & "=" & Len(maxw) & "字节"
End Su