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

[µo°Ý] ¦p¦ó±NWorksheet_ChangeªºÅܼƫŧi¡A§ï¦¨¦b¤@¯ë¼Ò²Õ¨Ï¥Î?

¥»©«³Ì«á¥Ñ jackson7015 ©ó 2014-5-8 09:09 ½s¿è

¦^´_ 10# GBKEE
·PÁÂGBKEEª©¤jªºÀ°¦£
¥i¥H¥¿±`¹B§@¤F

¦Û¤v©Ò»Ý­nªº³¡¤À¬O¤U­±ªº¨º¨Çµ{¦¡½X¡A§R°£¤F¨Ç¤£»Ý­nªº³¡¤À
vbªºµ{¦¡½X³£¤£·|½s¼g¡A³£¥u·|¤@¨Ç²³æªº¤@¯ë°Ï½s¼g
·PÁª©¤jªºµL¤ß¥I¥X

·Q¦A½Ð°Ýª©¤jMsgBoxªº°ÝÃD
¦pªG§Ú·Q¦b¤U¦Cªºµ{¦¡½X¤¤´¡¤J¤@«h"¬d¸ß¤¤"ªºMsgBox¡A¦ý¬O·|¦b·j´Mµ²§ô«á¡AMsgBoxµøµ¡·|¦Û°Ê®ø°£
¨ººØMsgBox»yªk¸Ó«ç»ò½s¼g ?

¬d¸ß¤F¯¸¤W¸ê®Æ¡A§ä¤£¤Ó¨ìMsgBox¦Û°Êµ²§ôªº¬ÛÃö¸ê®Æ
  1. Sub ¬d¸ß¸ê®Æ()
  2.     Dim F As Range, AD As String, Rng As Range, xRng As Range
  3.     Set xRng = Sheets("¬d¸ß¥Îªí³æ").[A5]
  4.     With Sheets("ºî¦X¸ê®Æ®w").UsedRange
  5.         Set F = .Find(xRng, LOOKAT:=xlPart)
  6.         If Not F Is Nothing Then AD = F.Address
  7.         Do While Not F Is Nothing
  8.             If Rng Is Nothing Then
  9.                 Set Rng = .Rows(F.Row)
  10.             Else
  11.                 Set Rng = Union(Rng, .Rows(F.Row))
  12.             End If
  13.             Set F = .FindNext(F)
  14.             If F.Address = AD Then Exit Do
  15.         Loop
  16.     End With
  17.     If Not Rng Is Nothing Then
  18.         Rng.Copy xRng.Offset(, 1)
  19.         MsgBox "¬d¸ßµ²§ô"
  20.     Else
  21.         xRng.Offset(, 1).Resize(, 50) = ""
  22.     End If
  23. End Sub
½Æ»s¥N½X

TOP

¦^´_ 11# jackson7015
  1. Sub MsgBox_Wait()
  2. Dim WshShell, BtnCode
  3. Set WshShell = CreateObject("WScript.Shell")
  4. BtnCode = WshShell.popup("µ¥«Ý2¬í¤£«ö§Ú´N¦Û°ÊÃö³¬?", 2, "´ú¸Õ:", 4 + 16)
  5. Select Case BtnCode
  6.    Case 6
  7.    BtnCode = "§A«ö¤F""¬O""." 'MsgBox "§A«ö¤F""¬O""."
  8.    Case 7
  9.    BtnCode = "§A«ö¤F""§_""." 'MsgBox "§A«ö¤F""§_""."
  10.    Case -1
  11.    BtnCode = "¨S¦³«ö¥ô¦óÁä"
  12. End Select
  13. BtnCode = WshShell.popup(BtnCode, 2, "´ú¸Õ§¹²¦", 1)
  14. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 12# GBKEE
·PÁÂGBKEEª©¤j

¦¹µ{¦¡½X¬Oµ¹¥¦³]©w¬í¼Æ,´N·|¦A«ü©w®É¶¡¤º Aoto Close

¤£¹L§Ú·Q¸ß°Ýªº¬O
¶}©l°õ¦æµ{¦¡½Xªº®É­Ô·|¥X²{MsgBox ¡AµM«áµ{¦¡½X°õ¦æµ²§ô«áMsgBox ¤]¸òµÛ®ø¥¢

¥H³o½gªº10¼Óµ{¦¡½X¬°¨Ò¡G
°õ¦æµ{¦¡½X>¥X²{MsgBox "¬d¸ß¤¤">¬d¸ßµ²§ô«á>MsgBox ®ø¥¢
³o°ÝÃD©M¥DÃD¨S¦³¤@­P¡A§Ú·QÁÙ¬O¥t¶}­Ó¥DÃD¤ñ¸û¦X¾A?

¦b¦¹¥Ñ°Jªº·PÁÂGBKEEª©¤jµL¨pªº±Ð¾É

TOP

³o°ÝÃD©M¥DÃD¨S¦³¤@­P¡A§Ú·QÁÙ¬O¥t¶}­Ó¥DÃD¤ñ¸û¦X¾A?
¦^´_ 13# jackson7015
µL¶·¥t¶}­Ó¥DÃD,¥iÄ~Äò¤U¥h

¸Õ¸Õ¬Ý Ex.rar (520.17 KB)
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 14# GBKEE
·PÁÂGBKEEª©¤jªº¦^À³

µ{¦¡°õ¦æ°_¨Ó§ó¦³¨t²Î¡A¤]§ó¬üÆ[¤F
·Q½Ð°Ýª©¤j
¦]¬°¦³®É­Ô·j´M¥ó¼Æ·|¦³¹F¨ì¼Æ¤Q¥ó¡A¬Æ¦Ü¦Ê¥ó
¦Ó¤j²¤¬Ý¤F±zªº½s¼g¡A¨C¦¸·|©µ¿ð1¬í°µ°j°é
³o¼Ë·|¦³«Üªø®É¶¡¦bµ¥«Ý°j°éªº¹Bºâ

¬O§_¦³ª½±µ¥HMsgBoxÅã¥Ü"·j´M¤¤"
µM«á·j´Mµ²§ô«áMsgBox®Ø¬[´N·|¦Û°Ê®ø¥¢ªº½s¼g¤è¦¡ ?(¤£¬O©µ¿ð¬í¼Æ)

«D±`·PÁÂGBKEEª©¤jÁÙ¯S§O¼g¤FTextBoxªºµ{¦¡

TOP

¦^´_ 15# jackson7015
°Ñ¦Ò³o¸Ì
  1. Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
  2. Sub ¬d¸ß¸ê®Æ()
  3.     UserForm1.Show
  4. End Sub
½Æ»s¥N½X
  1. Private Sub UserForm_Activate()
  2.     Dim F As Range, AD As String, Rng As Range, i
  3.     xRng.CurrentRegion.Offset(1, 1) = ""
  4.     Application.Wait Time + #12:00:01 AM#
  5.     With Sheets("ºî¦X¸ê®Æ®w").UsedRange
  6.         Set F = .Find(xRng, LOOKAT:=xlPart)
  7.         If Not F Is Nothing Then AD = F.Address
  8.         Do While Not F Is Nothing
  9.             i = i + 1
  10.             Label1.Caption = xRng & vbTab & "¬d¨ì " & i & " µ§"
  11.             DoEvents
  12.             Sleep 100   '§ï¥Î¼È°±0.1¬í
  13.            ' Application.Wait Time + #12:00:01 AM#
  14.             If Rng Is Nothing Then
  15.                 Set Rng = .Rows(F.Row)
  16.             Else
  17.                 Set Rng = Union(Rng, .Rows(F.Row))
  18.             End If
  19.             Set F = .FindNext(F)
  20.             If F.Address = AD Then Exit Do
  21.         Loop
  22.     End With
  23.     If Not Rng Is Nothing Then
  24.         Rng.Copy xRng.Offset(, 1)
  25.     Else
  26.         Label1.Caption = xRng & vbTab & "¬dµL¸ê®Æ"
  27.         DoEvents
  28.         Sleep 100
  29.         'Application.Wait Time + #12:00:01 AM#
  30.     End If
  31.     Unload Me
  32. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 16# GBKEE
·PÁÂGBKEEª©¤jªº¦^ÂÐ

­ì¨Ó°±¯dªº¬í¼Æ¬Oµ{¦¡­ì¥»ªº³]©w°Ú¡AÁÙ¥H¬°¬OApplication.Wait Time ªºÃö«Y¡A·Q»¡³o½s½X¦n¹³¤£¯à¼g¤p©ó1¬í

³o½g°Q½×Àò¯q¨}¦h
¨Ï¥Î¨ìªº¬ÛÃö½s½XÁÙ¦³«Ü¦h¤£©ú¥Õªº¡A¦AºCºC¦a®ø¤Æ
¥Ñ°J·PÁÂGBKEE¤j¤jªº¥I¥X¡AÁÂÁÂ~

TOP

        ÀR«ä¦Û¦b : ¯¸¦b¥b¸ô¡A¤ñ¨«¨ì¥Ø¼Ð§ó¨¯­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD