Worksheet_SelectionChange ¤Î Worksheet_Change
- ©«¤l
- 176
- ¥DÃD
- 98
- ºëµØ
- 0
- ¿n¤À
- 279
- ÂI¦W
- 0
- §@·~¨t²Î
- window 7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-2-17
- ³Ì«áµn¿ý
- 2020-4-8
|
Worksheet_SelectionChange ¤Î Worksheet_Change
Worksheet_SelectionChange ¤Î Worksheet_Change
½Ð°Ýµ{¦¡¤¤¦P®É¨Ï¥Î Worksheet_SelectionChange ¤Î Worksheet_Change ®É
¦p¦ó¦b§ó§ïÀx¦s®æ¤º®e®É, ¥uIJµoWorksheet_Change ¨Æ¥ó
¹Á¸Õ¹L¦bµ{¦¡¶}©l¥[¤W Application.EnableEvents = False
µ²§À¥[¤WApplication.EnableEvents = true
½Ð«ü±Ð |
|
|
|
|
|
|
- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¥»©«³Ì«á¥Ñ lpk187 ©ó 2017-5-30 00:16 ½s¿è
¦^´_ 1# enoch
·í§A¦P®É¨Ï¥ÎWorksheet_Change©M Worksheet_SelectionChange®É¡A
¥un§AÅܧó¬YÀx¦s®æ«á¡A«ö¤UEnterÁä©ÎTabÁä¡A³o®ÉWorksheet_SelectionChange·|¤ñWorksheet_Change¥ýIJµo¨Æ¥ó¡A
¦Ó§A¦bWorksheet_Change ¨Æ¥ó¤¤¥[¤W Application.EnableEvents = False ¬OµL®Äªº¡A¥¦¥ý±Ò°Ê¤FWorksheet_SelectionChange¨Æ¥ó
°£«DÃö³¬±¼ "«öEnterÁä«á¡A²¾°Ê¿ï¨ú½d³ò":°Ñ·Ó¤U¹Ï¡A¤£n¤Ä¿ï³oÓ¶µ¥Ø
©ÎªÌ¥[¤W³o2Өƥó- Private Sub Worksheet_Activate()
- Application.MoveAfterReturn = False
- End Sub
- Private Sub Worksheet_Deactivate()
- Application.MoveAfterReturn = True
- End Sub
½Æ»s¥N½X ¤]´N¬O»¡·í§A§ïÅܤFÀx¦s®æ¤º®e«á«ö¤UEnterÁ䤣n²¾°Ê¿ï¨úªºÀx¦s®æ¦Ó¬O¥ÎWorksheet_Change¥h²¾°Ê¥¦ |
|
|
|
|
|
|
- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¥»©«³Ì«á¥Ñ lpk187 ©ó 2017-5-30 00:18 ½s¿è
¦^´_ 1# enoch
¦p¤U¡G- Dim xl_Address '³]¤@Ó¤½¥ÎÅܼơAŪ¨ú¦ì§}¥Î
- Private Sub Worksheet_Change(ByVal Target As Range)
- Application.EnableEvents = False '³o¸Ì¥u¬O¼È®É¶}³¬¡A¼È®É¤£·|IJµo¤U¤@¦æªº²¾°Ê(¥u¬O¼È®Éªº¡A¥¦ÁÙ¬OIJµo¡A¥u§A§A¤@¥´¶}¡A¥¦ÁÙ¬O·|IJµoªº)
- Target.Offset(1).Select '°õ¦æ³o¦æ®É¨Ã¤£·|±Ò°ÊWorksheet_SelectionChange
- xl_Address = Target.Address ' ¦Û³]±ø¥óÂ_ÂI¡A¥H§Q Worksheet_SelectionChange §PÂ_¥Î
- Application.EnableEvents = True '·í³o¸Ì¥´¶}®É¡A¤@¼Ë·|±Ò°Ê SelectionChange ¤£¹L©O¡A¥¦²¾°Êªº¦ì¸m?¬O¥Ø«eªºÀx¦s®æ¦ì¸m¡A¤ñ¦p»¡¦bA1§ïÅܤº®e¦Ó²¾°Êªº¦ì¸mÁÙ¬OA1
- End Sub
- Private Sub Worksheet_SelectionChange(ByVal Target As Range) '©Ò¥H¦b³o¸Ìªº¤@¶}©l´Nn¥[¤J§PÂ_¤F
- If xl_Address = Target.Address Then '·í¥Ø¼ÐÀx¦s®æªº¦ì§}©MWorksheet_Change¤@¼Ë®É¡A¸õ¥X¦¹¨Æ¥ó
- xl_Address = Null '³]xl_Address¬°null¡A³o¼Ë·í§AÀx¦s®æ¦ì¸m§ïÅܮɤ]¤£·|¦]¦¹¦Ó¤£¦AIJ°Ê SelectionChange¨Æ¥ó
- Exit Sub 'Â÷¶}¦¹¨Æ¥ó
- End If
- Cells(1, 1).Select '©Ò¥H·íÀx¦s®æ¤º®e§ïÅܮɳo¸Ì¬O¤£·|°õ¦æªº(³o¸Ì¥u¬O°²³]ªºµ{¦¡½X¡A¤]¬O§A¦Û¤vªºµ{¦¡½X³¡¥÷¡A¤£n§Û¶i¥h§Aªºµ{¦¡½X¤¤)
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|