ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦Û°Ê¹Bºâªº¼gªk

[µo°Ý] ¦Û°Ê¹Bºâªº¼gªk

½Ð°Ý¤@¤U¡A§Ú·Q­nÅý¤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ÁÂÁÂ~~~

¦^´_ 1# owen06
  1. Option Explicit
  2. 'EnableEvents ÄÝ©Ê  ¦pªG«ü©wª«¥ó¯àIJµo¨Æ¥ó¡A«h¥»Äݩʬ° True¡CŪ/¼g Boolea
  3. 'ª«¥ó¯àIJµo¨Æ¥ó ->  ±Ò°Êª«¥óªº¹w³]µ{§Ç
  4. Private Sub Worksheet_Change(ByVal Target As Range)  'Worksheet_Change ¤u§@ªíÀx¦s®æ¦³­×§ïªº¹w³]µ{§Ç
  5.     Application.EnableEvents = False                 '°±¤î: IJµo¨Æ¥ó
  6.     For i = 1 To 10
  7.         Cells(i, 3) = Cells(i, 2) + Cells(i, 1)
  8.     Next
  9.     Application.EnableEvents = True                    ''±Ò°Ê: IJµo¨Æ¥ó
  10. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE

ª©¥D§A¦n¡A§Ú½Æ»s¥N½X¥h°õ¦æ¡A¦ba1¿é¤J¼Æ¦r·|¥X²{¡¨Åܼƥ¼©w¸q¡¨¡A
½Ð°Ý¬O­þÃ䦳°ÝÃD©O¡HÁÂÁÂ~

2013-07-25_115235.jpg (103.41 KB)

2013-07-25_115235.jpg

TOP

¦^´_ 3# owen06
¥[¤W Dim i As Integer ´N OK ¤F¡I
  1. Option Explicit
  2. 'EnableEvents ÄÝ©Ê  ¦pªG«ü©wª«¥ó¯àIJµo¨Æ¥ó¡A«h¥»Äݩʬ° True¡CŪ/¼g Boolea
  3. 'ª«¥ó¯àIJµo¨Æ¥ó ->  ±Ò°Êª«¥óªº¹w³]µ{§Ç
  4. Private Sub Worksheet_Change(ByVal Target As Range)  'Worksheet_Change ¤u§@ªíÀx¦s®æ¦³­×§ïªº¹w³]µ{§Ç
  5.     Dim i As Integer
  6.     Application.EnableEvents = False                 '°±¤î: IJµo¨Æ¥ó
  7.     For i = 1 To 10
  8.         Cells(i, 3) = Cells(i, 2) + Cells(i, 1)
  9.     Next
  10.     Application.EnableEvents = True                    ''±Ò°Ê: IJµo¨Æ¥ó
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 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

TOP

·PÁÂ¥H¤W¦U¦ìªº«ü¾É¡A¹ï©ó§Ú³o­Ó­è¶R®Ñ¨Ó¾Çªº¦ÑÀY¤l¨Ó»¡¡A¯u¬OÀò¯q¨}¦h¡C

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD