-- 奇怪事请教?
甜大师:好!请教一下怪事。实在是搞不懂?
为何一张excel表导入后,运行下面的代码,显示出错,当打开excel表拉一下列保存一下,再重新运行就不出问题。为何?????
Dim shzs1() As String
shzs1 = new String() {"本月"}
Dim rs3 As DataRow
Dim zbl As Integer
For Each shz1 As String In shzs1
For Each cl1 As DataCol In rgs.dataCols
rs3 = rgs.find(cl1.name & " Like \'" & shz1 & "*\'")
If rs3 IsNot Nothing Then
zbl = zbl +1
Else
Continue For
End If
Next
If zbl = 1 Then
Exit For
Else
MessageBox.Show("请将本月数进行修改!")
Return Nothing
End If
Next