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

If Not c Is Nothing Then»yªk

If Not c Is Nothing Then»yªk

³o¸Ì¥i¯à¦³·¸¦ìªº°ÝÃD... §ÚÃhºÃ¬O¤£¬OIf Not c Is Nothing Then»yªk§Ú¤£·|¥ÎªºÃö«Y
¤£ª¾¹D¬O¤£¬O¹³«e½gµo¤å¤j¤j©Ò»¡ÅܼƸê®Æ«¬ºA³]¿ù
¤U­±¦³¨â­Ósheets  ¡AQS¬O±q order_pool§ì¥X¨Óªºµ¥«Ý­q³æ
°ß¤@¤£¦Pªº¬O ¥¦¤w¸g²Å¦X¬Y¨Ç»Ý¨D¤~·|©ñ¨ìQSªí³æ¤¤
§Æ±æ§Ú¨S¦³ªí¹Fªº¨¥¤£§Y·N@@
============================================
  1. '½Ð°ÝIf Not c Is Nothing Then ¥Îªk

  2.     Dim b As Variant

  3.     b = Sheets("QS").Range(RR)


  4.     For Each r In Worksheets("order_pool").Range("A1", Sheets("order_pool").Range("A1").End(xlDown))
  5.          Set c = r.Find(b, , , xlWhole)   '³]©w¤º®e¬°bªºÀx¦s®æª«¥ó¬°c
  6.          
  7.              If Not c Is Nothing Then Drr = c.Address
  8.             '¨C§ä¨ìC«h±NCªº¬Û¹ï¦ì§}©ñ¶iDRR
  9.     Next
  10.     Sheets("order_pool").Range(Drr).Delete '§R°£±qorder pool¨ú¥X¤§¸ê®Æ
½Æ»s¥N½X
Àɮצ³ÂI¤j ©Ò¥H¥ÎDROPBOX³sµ²  
https://dl.dropbox.com/u/16247104/0715afternoon.xlsm

Àɮ׸̭±¼Æ¾Ú¤£»ô¥þ, «ÜÃø°µ´ú¸Õ.
¬O¹B¦æ³o­Ó®É¦³°ÝÃD¶Ü? Sub Call_order_pool_Add_batch_pool_del_order_pool2()

Dim RR, Drr As String
Dim i, j, num_of_item, opA, OC As Integer
Dim r, c, b As Variant

¥ý§âi, j... ³o¨Ç©w¸q¦nÃþ«¬, «Ü¤j¾÷·|¬Ointeger¥X°ÝÃD
Dim i as long, j as long, num_of_item as long, OC As long
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2012-7-17 11:09 ½s¿è

¦^´_ 1# m09903020

RR = Sheets("SAMRD").Cells(1, 3) <==    ³o¤@¥y±a¥X¨Óªº¬O[µL]
                                                                                  ³o¼Ëªº¼gªkRR=Sheets("SAMRD").Cells(1, 3) ªº¤º®e
                                                                                  Sheets("SAMRD").Cells(1, 3)ªº¤º®e´N¥²¶·­n¬OÀx¦s®æªº¼gªk
                                                                                  ¤~¯à®M¥Î¨ì¤U¤@¥y
b = Sheets("QS").Range(RR)            <=== run¨ì³o¤@¥y´N¬O¿ù»~ªº

­×§ï¦¨¥H¤Uªº¤è¦¡~ ¥iÁקK¿ù»~
If Sheets("SAMRD").Cells(1, 3) = "" Then Exit Sub    '·íSheets("SAMRD").Cells(1, 3) = "" ¸õ¥X°õ¦æ
RR = Sheets("SAMRD").Cells(1, 3)
b = Sheets("QS").Range(RR)


If Not c Is Nothing Then Drr = c.Address    <====­Y³o¤@¥y³£¨S°õ¦æ¨ì Drr = c.Address

Sheets("order_pool").Range(Drr).Delete      <====·íDrr¤W­±¨º¤@¥y¬OªÅªº®É­Ô,³o¤@¥y´N·|¦³¿ù»~²£¥Í
  1. Sub Call_order_pool_Add_batch_pool_del_order_pool2()

  2. Dim RR, Drr As String

  3. Dim i, j, num_of_item, opA, OC As Integer

  4. Dim r, c, b As Variant

  5. RR = Sheets("SAMRD").Cells(1, 3) '(1,3)­n·F¹À?Sheets("order_pool").[C1].Resize(s, 1) = Arr2

  6. b = Sheets("QS").Range(RR)


  7. Sheets("batch_order_pool").Cells(seed_counter, a_batch_followering_order_counter + 1) = Sheets("Á`­q³æ").Cells(b + 1, 1)

  8. OC = 100 - RC

  9. If (Sheets("Á`­q³æ").Cells(b + 1, 1) > 0) And (Sheets("Á`­q³æ").Cells(b + 1, 1) < 3001) Then
  10.   
  11.   num_of_item = 5
  12.   
  13. ElseIf (Sheets("Á`­q³æ").Cells(b + 1, 1) >= 3001) And (Sheets("Á`­q³æ").Cells(b + 1, 1) < 6001) Then
  14.   
  15.   num_of_item = 10

  16. ElseIf (Sheets("Á`­q³æ").Cells(b + 1, 1) >= 6001) And (Sheets("Á`­q³æ").Cells(b + 1, 1) < 9001) Then '50 items
  17.   
  18.   num_of_item = 50
  19.   
  20. Else

  21.     MsgBox "error³o»ò¤E«Ü©_©Ç£°§A"

  22. End If

  23.   Call cal_RC(num_of_item)
  24.   
  25.   If RC >= 0 Then
  26.   
  27.   For j = 1 To num_of_item
  28.    
  29.      Sheets("batch_pool").Cells(seed_counter, OC + j) = Worksheets("Á`­q³æ").Cells(b + 1, j + 6)
  30.   
  31.   Next

  32.     For Each r In Worksheets("order_pool").Range("A1", Sheets("order_pool").Range("A1").End(xlDown))
  33.          Set c = r.Find(b, , , xlWhole)   '³]©w¤º®e¬°bªºÀx¦s®æª«¥ó¬°c
  34.          
  35.              If Not c Is Nothing Then Drr = c.Address
  36.             '¨C§ä¨ìC«h±NCªº¬Û¹ï¦ì§}©ñ¶iDRR
  37.     Next
  38.         
  39.         Sheets("order_pool").Range(Drr).Delete '§R°£±qorder pool¨ú¥X¤§¸ê®Æ
  40.       
  41.   End If
  42.   
  43. End Sub
½Æ»s¥N½X
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

Àɮ׸̭±¼Æ¾Ú¤£»ô¥þ, «ÜÃø°µ´ú¸Õ.
¬O¹B¦æ³o­Ó®É¦³°ÝÃD¶Ü? Sub Call_order_pool_Add_batch_pool_del_order_ ...
kimbal µoªí©ó 2012-7-16 13:41


ÁÂÁ¤j¤j¡A¡@·¸¦ìªº°ÝÃD§Ú§ä¤F¦n´X¤Ñ¤~µo²{¬Oµ{¦¡°õ¦æÅÞ¿è¤Wªº¿ù»~¡A¦b¢÷¢ú¢ì¢í¢ú¢ø¢÷¢÷¢ô¡@³Ì«á¤@µ§¸ê®Æªº§PÂ_¥X¤F¥]

TOP

¦^´_ 3# hugh0620


    ÁÂÁ¤j¤j¡A§Ú¥Î¤F±zªºµ{¦¡§ï¹L¡A³o¼Ë°ÝÃD´î¤Ö³\¦h¡A

¡@µM«á§Ú¤Sµo²{row.countªº­ì¥ýµ{¦¡½X¡A¥Î¨Ó­pºâorder pool¡@¦C¼Æ¶q¦³»~¡A¡@§ï¦¨rows ´N¤Ö¤F¤@¨Ç°ÝÃD²£¥Í

TOP

        ÀR«ä¦Û¦b : ¦³´¼¼z¤~¯à¤À¿ëµ½´c¨¸¥¿¡F¦³Á¾µê¤~¯à«Ø¥ß¬üº¡¤H¥Í¡C
ªð¦^¦Cªí ¤W¤@¥DÃD