返回列表 上一主題 發帖

[發問] 標示選擇的儲存格

回復 1# 蘿蔔泥

試試看~~~
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
  2. If Application.CutCopyMode = xlCopy Then Me.Paste
  3.   On Error Resume Next
  4.   [colorCell].FormatConditions.Delete
  5.   Rows(Target.Row).Name = "colorCell"
  6.   With [colorCell].FormatConditions      ' 設定格式化條件
  7.       .Delete
  8.       .Add xlExpression, , "TRUE"        ' 條件(一)內公式為
  9.       .Item(1).Interior.ColorIndex = 36  ' .Item(1)等於FormatConditions(1)
  10.       .Item(1).Font.Bold = True
  11.   End With
  12. End Sub
複製代碼

TOP

        靜思自在 : 人生沒有所有權,只有生命的使用權。
返回列表 上一主題