- ©«¤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
|
¸Õ¸Õ¬Ý:- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- Dim Rng As Range
- Dim col1, row1 As Integer
- col1 = Target.Column
- row1 = Target.Row Mod 5
- Set Rng = Union([H4:K5], [H9:K10], [H14:K15], [H19:K20]) '³]©w Worksheet_SelectionChange IJ°Ê°Ï°ì
- [B4:K20].Interior.ColorIndex = xlNone
- If Not Intersect(Target, Rng) Is Nothing Then
- Target.Interior.ColorIndex = 7
- If row1 = 4 Then
- Select Case col1
- Case Is = 8: Target.Offset(1, -6).Resize(1, 2).Interior.ColorIndex = 7
- Case Is = 9: Target.Offset(0, -7).Resize(1, 2).Interior.ColorIndex = 7
- Case Is = 10: Target.Offset(0, -8).Resize(2, 1).Interior.ColorIndex = 7
- Case Is = 11: Target.Offset(0, -8).Resize(2, 1).Interior.ColorIndex = 7
- End Select
- Else
- Select Case col1
- Case Is = 8: Target.Offset(0, -4).Resize(1, 2).Interior.ColorIndex = 7
- Case Is = 9: Target.Offset(-1, -5).Resize(1, 2).Interior.ColorIndex = 7
- Case Is = 10: Target.Offset(-1, -6).Resize(2, 1).Interior.ColorIndex = 7
- Case Is = 11: Target.Offset(-1, -6).Resize(2, 1).Interior.ColorIndex = 7
- End Select
- End If
- End If
- End Sub
½Æ»s¥N½X
¥O¬ÛÃö°Ï°ìÅã¥Ü¦â±m.rar (8.93 KB)
|
|