-- 作者:Springamy
-- 发布时间:2017/11/29 9:25:00
--
问题如图:当excel合同号只有一行的时候,不执行for里面的代码,这个要怎么修改
If Sheet(7,1).value <> "" Then msgbox("测试1") For m As Integer = 8 To BOMH+1 \'行 msgbox(m) Dim rcp As Row = Tables("付款表").AddNew For n As Integer = 0 To Sheet.Cols.Count-1 For p As Integer = 3 To s3.Length-1 \'从第四列\'开始填充\' If cstr(Sheet(7,n).value) = s3(p) Then rcp(s3(p)) = Sheet(m,n).value End If Next Next msgbox("测试2") Next msgbox("测试3") End If
此主题相关图片如下:1.png
此主题相关图片如下:2.png
|