怎么删除不标准行

来源:百度知道 编辑:UC知道 时间:2024/06/03 09:53:38
怎么删除不标准行
Text1窗口有多行数据:(01-33之间的数据,每行8个数)
13 33 28 30 27 31 11 14
03 05 02 01 04 06 33 11
05 02 03 04 06 01 31 32
01 02 03 04 05 06 22 23
13 33 28 30 27 31
03 05 02
点comd1 删除Text1窗口中不标准行(保留1行8个数的行,删除其他行,包括空行)

13 33 28 30 27 31 11 14
03 05 02 01 04 06 33 11
05 02 03 04 06 01 31 32
01 02 03 04 05 06 22 23

Private Sub Command1_Click()
Static i As Integer
Text2.Text = ""

a = Split(Text1.Text, vbCrLf)
For x = 1 To 1
If i = UBound(a) + 1 Then i = 0
Text2.Text = Text2.Text & a(i) & vbCrLf
i = i + 1
Next x
End Sub

Private Sub Command2_Click()
If UBound(Split(Trim(Text2.Text))) = 7 Then
Text3.Text = Text3.Text & Text2.Text & vbCrLf
End If
End Sub