ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

excel»E¥ú灯«ç¼Ë¤£¼vÅT­ì¨Ó®æ¦¡¤WªºÃC¦â

excel»E¥ú灯«ç¼Ë¤£¼vÅT­ì¨Ó®æ¦¡¤WªºÃC¦â

  1. Private Sub CheckBox1_Click()
  2. If CheckBox1.Value = False Then
  3. CheckBox1.Caption = "Ãö"
  4. ActiveSheet.Cells.Interior.ColorIndex = xlNone
  5. Else: CheckBox1.Caption = "¶}"
  6. End If
  7. End Sub
  8. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  9. If CheckBox1.Caption = "¶}" Then Call Spotlight(Target)
  10. End Sub
  11. Sub Spotlight(ByVal Target As Excel.Range)
  12. On Error Resume Next
  13. Cells.FormatConditions.Delete
  14. With Target.EntireColumn

  15.             .FormatConditions.Add xlExpression, , "=true"

  16.             .FormatConditions(1).Interior.ColorIndex = 20

  17.         End With

  18.         With Target.EntireRow

  19.             .FormatConditions.Add xlExpression, , "=true"

  20.             .FormatConditions(2).Interior.ColorIndex = 20

  21.         End With

  22. End Sub
½Æ»s¥N½X
«ç¼Ë¸Ñ¨MÃö±¼¤§«á¥i¥H§R°£»E¥ú¿O

¦^´_ 2# ­ã´£³¡ªL
ÁÂÁ­ã¤j¤j
§Ú¸Õ¹L¥[¤W³o¤@¥y¡GCells.FormatConditions.Delete
¦ý¬O·|§â§Ú­ì¨Óªí®æ¤Wªº©Ò¥HÃC¦â³£§R°£¡A½Ð°Ý­ã¤j¬O¤£¬O¤£¯à³æ¿W§R°£»E¥ú¿Oªº¤Q¦r¦ì¡C

TOP

¦^´_ 5# ­ã´£³¡ªL
­ì¨Ó³o¼Ë§R°£¬õ¦â¨º¤@¦æ´N¥i¥H¤F¡CÁÂÁ­ã¤j¤j

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¯Ê¤fªºªM¤l¡A¦pªG´«¤@­Ó¨¤«×¬Ý¥¦¡A¥¦¤´µM¬O¶êªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD