¼ÐÃD:
[µo°Ý]
¦Û°Ê¹Bºâªº¼gªk
[¥´¦L¥»¶]
§@ªÌ:
owen06
®É¶¡:
2013-7-25 09:37
¼ÐÃD:
¦Û°Ê¹Bºâªº¼gªk
½Ð°Ý¤@¤U¡A§Ú·QnÅý¤u§@ªíA1¸òB1¿é¤J¼Æ¦r¡AC1´N¥i¥H¦Û°Ê¹Bºâ¡A
§Ú¥Î¤@¯ëªº¥¨¶°¥h°õ¦æ¬OOKªº¡A
For i = 1 To 10
Cells(i, 3) = Cells(i, 2) + Cells(i, 1)
Next
¥i¬O¦pªG¥Î¡yCHANGE¡z´N·|Åܦ¨µL°j°é¡A¤@ª½²æÂ÷¤£¤F¡A
¥ÎDO UNTIL¤]¤@¼Ë¦º¦b¨ºÃä¡A
½Ð°Ý¦b¡yCHANGE¡z¤U¡A¸Ó«ç»ò¼g¤~¤£·|³´¤JµL°j°é¡HÁÂÁÂ~~~
§@ªÌ:
GBKEE
®É¶¡:
2013-7-25 11:12
¦^´_
1#
owen06
Option Explicit
'EnableEvents ÄÝ©Ê ¦pªG«ü©wª«¥ó¯àIJµo¨Æ¥ó¡A«h¥»Äݩʬ° True¡CŪ/¼g Boolea
'ª«¥ó¯àIJµo¨Æ¥ó -> ±Ò°Êª«¥óªº¹w³]µ{§Ç
Private Sub Worksheet_Change(ByVal Target As Range) 'Worksheet_Change ¤u§@ªíÀx¦s®æ¦³×§ïªº¹w³]µ{§Ç
Application.EnableEvents = False '°±¤î: IJµo¨Æ¥ó
For i = 1 To 10
Cells(i, 3) = Cells(i, 2) + Cells(i, 1)
Next
Application.EnableEvents = True ''±Ò°Ê: IJµo¨Æ¥ó
End Sub
½Æ»s¥N½X
§@ªÌ:
owen06
®É¶¡:
2013-7-25 11:57
¦^´_
2#
GBKEE
ª©¥D§A¦n¡A§Ú½Æ»s¥N½X¥h°õ¦æ¡A¦ba1¿é¤J¼Æ¦r·|¥X²{¡¨Åܼƥ¼©w¸q¡¨¡A
½Ð°Ý¬OþÃ䦳°ÝÃD©O¡HÁÂÁÂ~
§@ªÌ:
c_c_lai
®É¶¡:
2013-7-25 12:31
¦^´_
3#
owen06
¥[¤W Dim i As Integer ´N OK ¤F¡I
Option Explicit
'EnableEvents ÄÝ©Ê ¦pªG«ü©wª«¥ó¯àIJµo¨Æ¥ó¡A«h¥»Äݩʬ° True¡CŪ/¼g Boolea
'ª«¥ó¯àIJµo¨Æ¥ó -> ±Ò°Êª«¥óªº¹w³]µ{§Ç
Private Sub Worksheet_Change(ByVal Target As Range) 'Worksheet_Change ¤u§@ªíÀx¦s®æ¦³×§ïªº¹w³]µ{§Ç
Dim i As Integer
Application.EnableEvents = False '°±¤î: IJµo¨Æ¥ó
For i = 1 To 10
Cells(i, 3) = Cells(i, 2) + Cells(i, 1)
Next
Application.EnableEvents = True ''±Ò°Ê: IJµo¨Æ¥ó
End Sub
½Æ»s¥N½X
§@ªÌ:
handsometrowa
®É¶¡:
2013-7-25 12:41
¦^´_
3#
owen06
§Aªºµ{¦¡½X³Ì¶}©l¦³¤U±³o±ø³¯z¦¡
Option Explicit
»yªk
Option Explicit
½Ðª`·N
Option Explicit ³¯z¦¡¥²¥X²{¦b¼Ò²ÕùØ¡A¥B¦b¥ô¦óµ{§Ç¤§«e¡C
·í Option Explicit ¦b¼Ò²Õ¤¤¨Ï¥Î®É¡A¥²¶·¥H Dim¡A Private¡BPublic¡BReDim ©Î Static ³¯z¦¡¨Ó©ú½T«Å§i©Ò¦³ªºÅܼơC¦pªG¨Ï¥Î¥¼«Å§iªºÅܼƦWºÙ¡A«h¦b½sĶ¶¥¬q®É¡A·|µo¥Í¿ù»~¡C
¦pªG¥¼¨Ï¥Î Option Explicit ³¯z¦¡¡A«h©Ò¦³¥¼«Å§iªºÅܼƳ£¬O Variant «¬ºA¡A°£«D¹w³]ªº«¬ºA¥t¥H Deftype ³¯z¦¡©Ò«ü©w¹L¡C
ªþµù Option Explicit ¥iÁקK¥´¿ùÅܼƦWºÙ©Î¦b¦³®Ä½d³ò¤º¬Û¦PªºÅܼƦWºÙ¡C
§@ªÌ:
owen06
®É¶¡:
2013-7-25 12:51
·PÁÂ¥H¤W¦U¦ìªº«ü¾É¡A¹ï©ó§Ú³oÓè¶R®Ñ¨Ó¾Çªº¦ÑÀY¤l¨Ó»¡¡A¯u¬OÀò¯q¨}¦h¡C
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)