- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¦^´_ 3# markoxp
¸Õ¸Õ¬Ý:- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Dim Rng As Range
-
- '©w Worksheet_Changeªº½d³ò
- Set Rng = Range("L4:L12")
- If Not Intersect(Target, Rng) Is Nothing Then
- Åã¥Ü¬d§ä¸ê®Æ Target
- End If
- End Sub
- Sub Åã¥Ü¬d§ä¸ê®Æ(ByVal Target As Range)
- Dim sh As Worksheet
- Dim findRng, Rng As Range
- Dim str1 As String
-
- Set sh = Sheets("Sheet1")
-
- '³]©w ·j´M½d³ò
- Set findRng = sh.[C3].Resize(26, 6)
- findRng.Font.ColorIndex = 1 '¥ý±N¦r«¬ÃC¦â³]¬°¶Â¦â
-
- Set Rng = findRng.Find(Target, LookAt:=xlPart) '¦b findRng ¤¤ ·j´M ActiveCell, ³¡¥÷·j´M
-
- If Rng Is Nothing Then
- MsgBox "§ä¤£¨ì¡i" & ActiveCell & "¡j", vbCritical
- Exit Sub
-
- '·j´Mµ²ªGÅܦâÅã¥Ü
- Else
- str1 = Rng.Address '«O¦s²Ä¤@Ó·j´Mµ²ªGªº¦ì§}
- Do
- Rng.Font.ColorIndex = 3
- Set Rng = findRng.FindNext(Rng) '´M§ä¤U¤@Ó Target
- Loop Until Rng.Address = str1 'ª½¨ì¤S¦^¨ì²Ä¤@Ó·j´Mµ²ªGªº¦ì§}
- End If
-
- End Sub
½Æ»s¥N½X |
|