返回列表 上一主題 發帖

[發問] Worksheet_SelectionChange的問題

回復 3# yen956
  1. Public BeforeCell As Range
  2. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  3. If BeforeCell Is Nothing Then Set BeforeCell = ActiveCell
  4. If BeforeCell.Address <> Target.Address Then MsgBox BeforeCell.Address & Chr(10) & BeforeCell(1)
  5. Set BeforeCell = Target(1)
  6. End Sub
複製代碼
學海無涯_不恥下問

TOP

        靜思自在 : 能善用時間的人,必能掌握自己努力的方向。
返回列表 上一主題