返回列表 上一主題 發帖

[發問] 不特定選區的資料互換

Private Sub CommandButton1_Click()
Dim xB As Range, Arr
With Selection
     If .Columns.Count > 1 Or .Column <> 10 Then Exit Sub
     If Intersect(Me.UsedRange, .Cells).Address <> .Address Then Exit Sub
     Set xB = Range(Replace(.Address, "J", "E"))
     Arr = .Value
     .Value = xB.Value
     xB.Value = Arr
End With
End Sub

TOP

        靜思自在 : 時時好心就是時時好日。
返回列表 上一主題