|
Private Sub CommandButton3_Click() '存储
If [h2] < " " Then MsgBox "请填单号": Exit Sub
With Sheets("出库")
Set rg = .[b:b].Find([h2], , , 1)
If Not rg Is Nothing Then MsgBox "单号重复": Exit Sub
r = .[b65536].End(3).Row + 1
For h = 6 To 11
If Range("a" & h) > " " Then
.Cells(r, 1) = [h3]
.Cells(r, 2) = [h2]
.Cells(r, 3) = [h4]
.Cells(r, 4) = [f13]
.Cells(r, 5) = [b4]
.Cells(r, 13) = [h6]
.Cells(r, 14) = [d13]
.Cells(r, 15) = [b13]
.Cells(r, 6) = Range("a" & h)
.Cells(r, 7) = Range("b" & h)
ar = Range("d" & h & ":h" & h)
.Range("h" & r & ":l" & r) = ar
r = r + 1
End If
Next h
End With
CommandButton3.Enabled = False
End Sub
|
-
保存时单元格内信息相同了
|