Àx¦s¦U¨ú±oµJÂI«á¬Y¤@Äæ¦ìÅܦâ
- ©«¤l
- 162
- ¥DÃD
- 33
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- excel 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2018-1-5
- ³Ì«áµn¿ý
- 2024-10-22
|
Àx¦s¦U¨ú±oµJÂI«á¬Y¤@Äæ¦ìÅܦâ
½Ð°Ý¦U¦ì¤j¤j
¤ñ¤èÂI¤FAR212Äæ¦ì
AG212©³¦â·|ÅÜ
n«ç³]p©O
ÁÂÁÂ |
|
|
|
|
|
|
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-3
|
¦^´_ 1# coafort
¤u§@ªí¼Ò²Õ¤U´Ó¤J:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target
If Replace(Split(.Address, "$")(1), ":", "") = "AR" Then
Me.UsedRange.EntireColumn.Interior.ColorIndex = xlNone
'¡ô¥O¥»ªí¨Ï¥Î®æªº¾ãÄ橳¦â¬°µL¦â
.Offset(, -11).Interior.ColorIndex = 6
'¡ô¥O¤@¶}©l¿ï¨ú®æ¬OARÄæÀx¦s®æ½d³òªº¥ª°¼11ÄæÀx¦s®æ©³¦â¬O¶À¦â
End If
End With
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 162
- ¥DÃD
- 33
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- excel 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2018-1-5
- ³Ì«áµn¿ý
- 2024-10-22
|
¥»©«³Ì«á¥Ñ coafort ©ó 2024-2-1 17:38 ½s¿è
¦^´_ coafort
¤u§@ªí¼Ò²Õ¤U´Ó¤J:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Targ ...
Andy2483 µoªí©ó 2024-2-1 14:23
½Ð°Ý¤j¤j
¥Î¤F¤§«áì¨ÓªºÃC¦â³£¨S¤F
ÁÂÁÂ |
|
|
|
|
|
|
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-3
|
¥»©«³Ì«á¥Ñ Andy2483 ©ó 2024-2-1 19:05 ½s¿è
¦^´_ 3# coafort
¤u§@ªí¼Ò²Õ¤U´Ó¤J:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target
If Replace(Split(.Address, "$")(1), ":", "") = "AR" Then
.Offset(, -11).EntireColumn.Interior.ColorIndex = xlNone
'¡ô¥OAGÄæ¾ãÄ橳¦â¬°µL¦â
.Offset(, -11).Interior.ColorIndex = 6
'¡ô¥O¤@¶}©l¿ï¨ú®æ¬OARÄæÀx¦s®æ½d³òªº¥ª°¼11ÄæÀx¦s®æ©³¦â¬O¶À¦â
End If
End With
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 162
- ¥DÃD
- 33
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- excel 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2018-1-5
- ³Ì«áµn¿ý
- 2024-10-22
|
¦^´_ coafort
¦^´_ 1# coafort
¤u§@ªí¼Ò²Õ¤U´Ó¤J:
Option Explicit
Private Sub Worksheet_Sel ...
Andy2483 µoªí©ó 2024-2-1 18:29
ÁÂÁ¤j¤j
½Ð°Ý¦³¿ìªk«O¯d즳Ä檺ÃC¦â¶Ü¡H |
|
|
|
|
|
|
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-3
|
¥»©«³Ì«á¥Ñ Andy2483 ©ó 2024-2-1 19:07 ½s¿è
¦^´_ 5# coafort
¤u§@ªí¼Ò²Õ¤U´Ó¤J:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target
If Replace(Split(.Address, "$")(1), ":", "") = "AR" Then
.Offset(, -11).Interior.ColorIndex = 6
'¡ô¥O¤@¶}©l¿ï¨ú®æ¬OARÄæÀx¦s®æ½d³òªº¥ª°¼11ÄæÀx¦s®æ©³¦â¬O¶À¦â
End If
End With
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 162
- ¥DÃD
- 33
- ºëµØ
- 0
- ¿n¤À
- 243
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- excel 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2018-1-5
- ³Ì«áµn¿ý
- 2024-10-22
|
¦^´_ coafort
¤u§@ªí¼Ò²Õ¤U´Ó¤J:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Ta ...
Andy2483 µoªí©ó 2024-2-1 18:57
³ø§i¤j¤j
Â÷¶}«á¶À©³¤£·|®ø¥¢C
ÁÂÁ¤j¤j |
|
|
|
|
|
|
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-12-3
|
¦^´_ 7# coafort
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim a as Range
With Target
For Each a in Intersect([AG:AG],Me.UsedRange)
If a.interior.Colorindex=6 Then a.interior.colorindex=xlnone
Next
If Replace(Split(.Address, "$")(1), ":", "") = "AR" Then
.Offset(, -11).Interior.ColorIndex = 6
'¡ô¥O¤@¶}©l¿ï¨ú®æ¬OARÄæÀx¦s®æ½d³òªº¥ª°¼11ÄæÀx¦s®æ©³¦â¬O¶À¦â
End If
End With
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 154
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 200
- ÂI¦W
- 31
- §@·~¨t²Î
- windwos 7
- ³nÅ骩¥»
- 64bit
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2017-5-29
- ³Ì«áµn¿ý
- 2024-11-28
|
https://stackoverflow.com/questions/58282085/change-cell-color-when-it-selected-and-back-original-color-after-leaving-it
¼Ó¥DnªºÀ³¸Ó¬O³oÓ¥\¯à |
|
|
|
|
|
|
- ©«¤l
- 154
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 200
- ÂI¦W
- 31
- §@·~¨t²Î
- windwos 7
- ³nÅ骩¥»
- 64bit
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2017-5-29
- ³Ì«áµn¿ý
- 2024-11-28
|
¥»©«³Ì«á¥Ñ quickfixer ©ó 2024-2-2 07:56 ½s¿è
¦^´_ 9# quickfixer
¸Ó¦ì§@ªÌªºµ{¦¡½X¦³2Ó°ÝÃD
µ{¦¡°õ¦æ¤¤,µLªkקïÃC¦â
µ{¦¡¶}ÀY¥[¤Jif, cc ¬Ýn¤£n¥Î¬YÓcell¥N´À
cc = "ÃC¦â¥iקï"
If cc = "ÃC¦â¥iקï" Then Exit Sub
¿ï¨úÄæ¦ì·|§âµLÃöªº¦C¼Æ¥þ³¡©ñ¤J°}¦C,¤]¤£¯à¿ï¾ãÓ¤u§@ªí,µ{¦¡·|lag¶W¤[
²³æ¥[Ó¨î,¥i¿ï¨úªº¦C¤W100,Äæ¤W26,³on¬Ý¹q¸£®Ä¯àקï
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static rngcolor As Range
Static OldColor As Variant
Dim rw As Long, cl As Long
'cc = "ÃC¦â¥iקï"
If cc = "ÃC¦â¥iקï" Then Exit Sub
If Target.Columns.Count > 26 Then Exit Sub
If Not rngcolor Is Nothing Then
If IsArray(OldColor) Then
On Error GoTo NoRestore
For rw = 1 To rngcolor.Rows.Count
For cl = 1 To rngcolor.Columns.Count
If IsEmpty(OldColor(rw, cl)) Then
rngcolor.Cells(rw, cl).Interior.ColorIndex = xlNone
Else
rngcolor.Cells(rw, cl).Interior.Color = OldColor(rw, cl)
End If
Next
Next
On Error GoTo 0
Else
If IsEmpty(OldColor) Then
rngcolor.Interior.ColorIndex = xlNone
Else
rngcolor.Interior.Color = OldColor
End If
End If
End If
NoRestore:
On Error GoTo 0
If Target.Rows.Count > 100 Then nr = 100 Else nr = Target.Rows.Count
Set rngcolor = Target.Resize(nr)
ReDim OldColor(1 To nr, 1 To Target.Columns.Count)
For rw = 1 To nr
For cl = 1 To Target.Columns.Count
If Target.Cells(rw, cl).Interior.ColorIndex = xlNone Then
OldColor(rw, cl) = Empty
Else
OldColor(rw, cl) = Target.Cells(rw, cl).Interior.Color
End If
Next
Next
rngcolor.Interior.Color = vbYellow
End Sub |
|
|
|
|
|
|