麻烦老师帮忙改一下代码
Private Sub Command15_Click()
Dim str1 As String, c As String
Dim arr() As String
Dim ii As Integer, hh As Integer, y As Integer
Dim a(1 To 12) As String
Dim count(7 To 12) As Long
Dim s As Integer
Dim i As Long, j As Long, k As Long, m As Long
Dim h As String
For ii = 0 To List2.ListIndex
str1 = List2.List(ii)
arr = Split(str1, ",")
For i = 0 To 11
a(i + 1) = arr(i)
Next
For y = 1 To MSFlexGrid1.Rows - 1
s = MSFlexGrid1.TextMatrix(y, 1)
c = s
If Len(c) = 3 And IsNumeric(c) And InStr(1, c, "-") = 0 And InStr(1, c, ".") = 0 And InStr(1, c, "E") = 0 Then
For k = 1 To 3
For j = 7 To 12
If InStr(1, a(j), Mid(c, k, 1)) <> 0 Then count(j) = count(j) + 1
Next j
Next k
For m = 7 To 12
If count(m) <> 0 Then
h = h & count(m) & a(m - 6)
End If
Next
End If
hh = MSFlexGrid1.Col
MSFlexGrid1.TextMatrix(y, hh + ii) = h
Erase count
h = ""
Next
Next
End Sub
这段代码不能辨认类似于s=078的,只要s开头是0的都不能辨认,该如何改呢
Dim str1 As String, c As String
Dim arr() As String
Dim ii As Integer, hh As Integer, y As Integer
Dim a(1 To 12) As String
Dim count(7 To 12) As Long
Dim s As Integer
Dim i As Long, j As Long, k As Long, m As Long
Dim h As String
For ii = 0 To List2.ListIndex
str1 = List2.List(ii)
arr = Split(str1, ",")
For i = 0 To 11
a(i + 1) = arr(i)
Next
For y = 1 To MSFlexGrid1.Rows - 1
s = MSFlexGrid1.TextMatrix(y, 1)
c = s
If Len(c) = 3 And IsNumeric(c) And InStr(1, c, "-") = 0 And InStr(1, c, ".") = 0 And InStr(1, c, "E") = 0 Then
For k = 1 To 3
For j = 7 To 12
If InStr(1, a(j), Mid(c, k, 1)) <> 0 Then count(j) = count(j) + 1
Next j
Next k
For m = 7 To 12
If count(m) <> 0 Then
h = h & count(m) & a(m - 6)
End If
Next
End If
hh = MSFlexGrid1.Col
MSFlexGrid1.TextMatrix(y, hh + ii) = h
Erase count
h = ""
Next
Next
End Sub
这段代码不能辨认类似于s=078的,只要s开头是0的都不能辨认,该如何改呢
...全文
相关推荐
《我的奶奶真麻烦》绘本故事PPT模板
《我的奶奶真麻烦》绘本故事PPT 奶奶的麻烦是嘘,要保密哦。她是一个外星人。其他的领养老金的人开始都怀疑这件事。直到一天,老师组织了一次去温索浦的出游活动。奶奶说:我们想去一个既让人兴奋又热闹的地方。老师打着响指说:安静,请坐下。温索浦的天气
现代交换原理PPT,自己学校老师制作。
这个是我们学校老师制作的PPT,里面总结了1~7章现代交换书上的知识点,超级详细。如果你嫌看书麻烦,总结知识太慢,可以来下载这个来当复习资料
写给老师的道歉信.pdf
写给老师的道歉信.pdf
感谢徐老师的授课.docx
感谢徐老师的授课.docx
给老师的一封信.doc
给老师的一封信.doc


VB基础类
