|
原帖由 FXSHENG 于 2010-3-17 16:26 发表
测试问题:
用“入库打印”生成“入库单”点“保存”可以继续,
而用“出库打印”生成“出库单”点“保存”却不能继续
出现"不能保存"的画面:
但当清除选中区域的内容后点“保存”可以继续,请老师帮忙看看!
Dim rowi As Integer
rowi = Sheet5.[a65536].End(xlUp).Row
With Sheet5
For tq = 10 To 15
'//// If Sheet1.Cells(tq, 2) = "" Then Exit For
If Sheet1.Cells(tq, 3) = "" Then Exit For
.Cells(rowi + 1, 1) = Cells(5, 3).value
.Cells(rowi + 1, 2) = Cells(5, 8).value
.Cells(rowi + 1, 3) = Cells(6, 3).value
.Cells(rowi + 1, 4) = Cells(6, 8).value
.Cells(rowi + 1, 5) = Cells(7, 3).value
.Cells(rowi + 1, 6) = Cells(7, 8).value
.Cells(rowi + 1, 17) = Cells(8, 3).value
.Cells(rowi + 1, 18) = Cells(18, 8).value
rowi = rowi + 1
.Range("g" & rowi & ":n" & rowi) = Range("b" & tq & ":i" & tq).value
.Cells(rowi, 15) = Cells(tq, 17)
.Cells(rowi, 16) = Cells(tq, 6) * Cells(tq, 17)
Next
End With |
|