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

[µo°Ý] ¦¹¥¨¶°¬°¦ó¿ù??

[µo°Ý] ¦¹¥¨¶°¬°¦ó¿ù??

¥»©«³Ì«á¥Ñ t8899 ©ó 2013-8-2 15:27 ½s¿è

Private Sub Worksheet_Calculate()
        Dim xx As Range
For Each xx In Range("AG2:AG111")
If IsError(xx) Then
     If xx > xx.Offset(, -1) And Range("Q24").Value = 1 And flag = True Then
CreateObject("Wscript.shell").Popup "===> " & Cells(xx.Row, 2).Value & "=====> " & xx.Value, 1, "Auto Closed MsgBox", 64
Range("Q24").Value = 2
   Application.OnTime Now + TimeValue("00:00:15"), "DDD"
      Exit For
     End If
     End If
Next
end sub
¿ù»~°T®§ «¬ºA¤£²Å¦X ==>¬õ¦â¦æ

¤@¶}Àɤ~·|¦³¿ù»~¡A¦ý¶]®É¬O¥¿±`ªº
¤@¶}ÀÉdde ³sµ² AG2:AG111 Àx¦s®æ·|2¬íªº¿ù»~°T®§, ±µµÛ´N¥¿±`,À³¸Ó¬O³o­ì¦]??
­n§âAG2:AG111 ªº¿ù»~©¿²¤¤~¦æ ,¤~·|¥Î]If  IsError(xx)

TOP

¤w¸Ñ¨M
If IsError(xx) Then §Ë¤Ï¤F
If not IsError(xx) Then ¤~¹ï

TOP

¦pªG AG2:AG111 ¦³10­Ó¦P®É¹F¨ì±ø¥ó
·|³sÄò10­Ó¹ï¸Ü²°¥X²{??
¥i¥H±N10­Ó©ñ¶i1­Ó¹ï¸Ü²°¥X²{¶Ü

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2013-8-3 00:01 ½s¿è

¦^´_ 4# t8899
¦]¬°¨S¹ê»ÚªºÀɮ׸ê®Æ¥i¥HÅçÃÒµ²ªG,
¸Õ¸Õ¬Ý©³¤Uªºµ{¦¡½X¬O§_²Å¦X§Aªº»Ý¨D.
  1.   Dim sStr$
  2.   Dim xx As Range

  3.   sStr = ""
  4.   For Each xx In Range("AG2:AG111")
  5.     If Not IsError(xx) Then
  6.       If xx > xx.Offset(, -1) And Range("Q24").Value = 1 And flag = True Then
  7.         If sStr <> "" Then sStr = sStr & Chr(10)
  8.         sStr = sStr & "===> " & Cells(xx.Row, 2).Value & "=====> " & xx.Value
  9.         Range("Q24").Value = 2
  10.         Application.OnTime Now + TimeValue("00:00:15"), "DDD"
  11.         Exit For
  12.       End If
  13.     End If
  14.   Next
  15.   If sStr <> "" Then CreateObject("Wscript.shell").Popup sStr, 1, "Auto Closed MsgBox", 64
½Æ»s¥N½X

TOP

¦^´_  t8899
¦]¬°¨S¹ê»ÚªºÀɮ׸ê®Æ¥i¥HÅçÃÒµ²ªG,
¸Õ¸Õ¬Ý©³¤Uªºµ{¦¡½X¬O§_²Å¦X§Aªº»Ý¨D.
luhpro µoªí©ó 2013-8-2 23:59

ÁÂÁÂ!
¤w´ú¸Õ ¡A²Å¦X±ø¥ó¤¤¥u·|¶Ç²Ä¤@­Ó
ªþÀɽдú¸Õ TEST.rar (19.51 KB)

TOP

¦^´_ 6# t8899
§â Exit For ®³±¼,
¤£µM·í±ø¥ó¦¨¥ß«á,
°j°é¥u·|°õ¦æ¤@¦¸.
  1. Private Sub Worksheet_Calculate()
  2.   Dim sStr$
  3.   Dim xx As Range

  4.   sStr = ""
  5.   For Each xx In Range("f2:F54")
  6.     If Not IsError(xx) Then
  7.       If xx > xx.Offset(, -1) And Range("I1").Value = 1 Then
  8.         If sStr <> "" Then sStr = sStr & Chr(10)
  9.         sStr = sStr & "===> " & Cells(xx.Row, 2).Value & "=====> " & xx.Value
  10.         'Exit For    <===== ®³±¼
  11.       End If
  12.     End If
  13.   Next
  14.   If sStr <> "" Then CreateObject("Wscript.shell").Popup sStr, 1, "Auto Closed MsgBox", 64
  15. End Sub
½Æ»s¥N½X

TOP

¦^´_  t8899
§â Exit For ®³±¼,
¤£µM·í±ø¥ó¦¨¥ß«á,
°j°é¥u·|°õ¦æ¤@¦¸.
luhpro µoªí©ó 2013-8-3 08:54

¥i¥H¤F¡AÁÂÁ«ü¾É!

TOP

¦^´_  t8899
§â Exit For ®³±¼,
¤£µM·í±ø¥ó¦¨¥ß«á,
°j°é¥u·|°õ¦æ¤@¦¸.
luhpro µoªí©ó 2013-8-3 08:54

·Q¦A¦h¥[¤@­Ó±ø¥ó
f2:F54 ¶W¹L 5­Ó ¥H¤W±ø¥ó¤~¦¨¥ß
­n¦p¦ó§ï?

TOP

·Q¦A¦h¥[¤@­Ó±ø¥ó
f2:F54 ¶W¹L 5­Ó ¥H¤W±ø¥ó¤~¦¨¥ß
­n¦p¦ó§ï?
t8899 µoªí©ó 2013-8-3 10:08

¶W¹L 5­Ó ¥H¤W?
¨º´NÃä³B²zÃä­p¼ÆÅo:
  1. Private Sub Worksheet_Calculate()
  2.   Dim lCount As Long
  3.   Dim sStr$
  4.   Dim xx As Range

  5.   sStr = ""
  6.   lCount = 0
  7.   For Each xx In Range("f2:F54")
  8.     If Not IsError(xx) Then
  9.       If xx > xx.Offset(, -1) And Range("I1").Value = 1 Then
  10.         If sStr <> "" Then sStr = sStr & Chr(10)
  11.         sStr = sStr & "===> " & Cells(xx.Row, 2).Value & "=====> " & xx.Value
  12.         lCount = lCount + 1
  13.       End If
  14.     End If
  15.   Next
  16.   If sStr <> "" And lCount > 5 Then CreateObject("Wscript.shell").Popup sStr, 1, "Auto Closed MsgBox", 64
  17. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤£­nÀH¤ß©Ò±ý¡A­nÀH¤ß±Ð¨|¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD