返回列表 上一主題 發帖

[發問] 複製儲存格範圍

回復 3# caichen3

簡化一下程式
  1. Private Sub CommandButton8_Click()
  2. With Sheet2
  3.   LC = .[IV3].End(xlToLeft).Column
  4.   If LC > 7 Then .Range(.Cells(3, 5), .Cells(4, LC - 3)).Delete Shift:=xlToLeft
  5. End With
  6. With Sheet1
  7.   LC = .[IV2].End(xlToLeft).Column
  8.   .Range(.Cells(1, 5), .Cells(2, LC)).Copy
  9.   Sheet2.Range("E3:E4").Insert Shift:=xlToRight
  10. End With
  11. End Sub
複製代碼

TOP

        靜思自在 : 手心向下是助人,手心向上是求人;助人快樂,求人痛苦。
返回列表 上一主題