|
各位:下面一段代码红色部分无法录入请帮忙修改一下!
感谢!
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Dim i, j, iRow_dn, iRow_dn2
If Application.WorksheetFunction.CountIf(Range("A2:D10"), "<>") < 36 Then
MsgBox "数据不能为空,请输入!!!!"
Exit Sub
End If
With Sheet3
iRow_dn = [a19].End(xlUp).Row
For i = 6 To iRow_dn
iRow_dn2 = .[A65536].End(xlUp).Row
.Cells(iRow_dn2 + 1, 1) = Cells(1, "b") 'B1单元格内如添加到指定位置(代码如何写)
.Cells(iRow_dn2 + 1, 2) = Cells(2, "b") 'B2单元格内如添加到指定位置
.Cells(iRow_dn2 + 1, 3) = Cells(3, "b") 'B3单元格内如添加到指定位置
.Cells(iRow_dn2 + 1, 4) = Cells(4, "b") 'B4单元格内如添加到指定位置
.Cells(iRow_dn2 + 1, 5) = Cells(2, "d") 'D2单元格内如添加到指定位置(代码如何写)
.Cells(iRow_dn2 + 1, 6) = Cells(3, "d") 'D3单元格内如添加到指定位置(代码如何写)
.Cells(iRow_dn2 + 1, 7) = Cells(4, "d")
For j = 4 To 9
.Cells(iRow_dn2 + 1, j) = Cells(i, j - 3)
Next j
Next i
End With
|
|