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

[µo°Ý] ¥X²{RUN-TIME ERROR '9': SUBSCRIPT OUT OF RANGE,½Ð°Ý­þ¸Ì¥X²{°ÝÃD¡H

¥X²{RUN-TIME ERROR '9': SUBSCRIPT OUT OF RANGE,½Ð°Ý­þ¸Ì¥X²{°ÝÃD¡H
198188 µoªí©ó 2012-12-26 16:10


²î´Áªí.rar (434.58 KB)

¥Ñ©óªþ¥óªºPARKER SHIPMENT ¤º®e¤Ó¦h¡A¾É­P¶W¹L1mb,µLªk¤W¶Ç¡A²{§R°£¤F³¡¤À¤º®e¡A¤~¤W¶Ç¡C

TOP

¦^´_ 21# 198188
21#ªºªþÀÉ ¦b2003ª©°õ¦æ 20#  ªºµ{¦¡¨S¦³¿ù»~.
ÁÙ»Ý 2007ª© ªº°õ¦æ ¬Ý¦³µL¿ù»~?

TOP

¦^´_ 22# GBKEE


    §Ú¬O2010ª©¥»¡A°õ¦æ®É¥X²{RUN-TIME ERROR '9': SUBSCRIPT OUT OF RANGE,½Ð°Ý­þ¸Ì¥X²{°ÝÃD¡H

TOP

¦^´_ 23# 198188
¦^´_ 22# GBKEE
¦]¬°§A©ÒªþÀɮתºµ{¦¡½X¤¤¤å³¡¤À¥þ¬°ÀËÅé¶Ã½X¡A
¹ïÀ³¤£¤Wªí³æ¦WºÙ©Ò­P¡A½Ð¦A­«·s½Æ»s GBKEE ª©¤jªºµ{¦¡½XÂл\¡A
«KOK¤F¡I

TOP

½Ð°Ý´M§ä¤£µ¥©óªÅ®æ¡A¬°¤°»ò§Ú¥Î <>""¡A¦ý¦³¨Ç¨Ó·½¥i¥H¡A¦³¨Ç¨Ó·½»Ý­n<>" "¤~¥i¥H¡H
¨ì©³­þ­Ó¤~¹ï¡H¦]¬°¨â­Ó³£¬O¦³¨Ç¨Ó·½¥i¥H¡A¦³¨Ç¨Ó·½¤£¥i¥H

TOP

¦^´_ 5# Hsieh

EXCEL 2010
½Ð°Ý´M§ä¤£µ¥©óªÅ®æ¡A¬°¤°»ò§Ú¥Î <>""¡A¦ý¦³¨Ç¨Ó·½¥i¥H¡A¦³¨Ç¨Ó·½»Ý­n<>" "¤~¥i¥H¡H
¨ì©³­þ­Ó¤~¹ï¡H¦]¬°¨â­Ó³£¬O¦³¨Ç¨Ó·½¥i¥H¡A¦³¨Ç¨Ó·½¤£¥i¥H

TOP

¦^´_ 26# 198188

""ªí¥ÜªÅ¦r¦ê
" "ªí¥Ü¤º®e¬°ªÅ¥ÕÁä(SPACE)
¦P¼Ë¬O¬Ý¤£¨£¤º®e¡A¦ýµ²ªG«o¬O¤£¦P
¸Ñ¨M¦¹°ÝÃD¥i¥Î½s¿è/¨ú¥N¥\¯à
¦b·j´M¥Ø¼Ð¿é¤JªÅ¥ÕÁä¡A¨ú¥N¬°¤è¶ô¤º¤£¿é¤J¥ô¦ó¦r¦ê
«hµ{¦¡½X§Y¥i¨Ï¥Î<>""
§_«h¥i¦b§PÂ_¬O¤º§Q¥ÎTRIM¨ç¼Æ
Trim(A)<>""
¦P¼Ë¥i¥HÁ׶}ªÅ¥ÕÁä°µ¤ñ¹ï
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 27# Hsieh


If Wb.Worksheets("New form of payment report").Range("k" & j).Value = Date And Wb.Worksheets("New form of payment report").Range("h" & j).Value >= 0.95 And Trim(Wb.Worksheets("New form of payment report").Range("h" & j).Value) <> "" Then

If FRng.Offset(, 6).Value >= 0.95 And Trim(FRng.Offset(, 6).Value) <> "" And Trim(A.Offset(, 5).Value) = "" Then

³o¼Ë¼g¹ï¶Ü¡H

TOP

¦^´_ 28# 198188
°ò¥»¤W»Pªk¬O¹ïªº¡A¦pªG¨S±o¨ì§A·Q­nªºµ²ªG¥i¯à¬O§Aªº§PÂ_¦¡°ÝÃD
¼gµ{¦¡­n«i©ó¹Á¸Õ¡A°õ¦æ¬Ý¬Ý¤~¯àª¾¹D§Aªº¿ù»~¦b­þ¸Ì
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

  1. Sub Detail()
  2. Dim FRng As Range
  3. Dim A As Range, Rng As Range
  4. Dim i As Integer
  5. fs = "W:\Payment Daily Report\HK ETA update.xlsx"
  6. Set Wb = Workbooks.Open(fs)
  7. With ThisWorkbook.Worksheets("State")
  8. For Each A In .Range(.[A2], .Range("A1").End(xlDown))
  9.      Set FRng = Wb.Sheets("HK HAIPONG").Range("A:A").Find(A, LookAt:=xlWhole, SearchDirection:=xlPrevious)
  10.      If Not FRng Is Nothing Then
  11.            A.Offset(, 2) = FRng.Offset(, 11).Value
  12.            If Rng Is Nothing Then Set Rng = A.Offset(, 2) Else Set Rng = Union(Rng, A.Offset(, 2))
  13.         End If
  14.    
  15.        Set FRng = Nothing
  16. Next
  17. End With
  18. Wb.Close 0

  19.   fs = "W:\Payment Daily Report\Mainland ETA Update.xlsx"
  20. Set Wb = Workbooks.Open(fs)
  21. With ThisWorkbook.Worksheets("State")
  22. For Each A In .Range(.[A2], .Range("A1").End(xlDown))
  23.      Set FRng = Wb.Sheets("MAILAND ETA").Range("A:A").Find(A, LookAt:=xlWhole, SearchDirection:=xlPrevious)
  24.      If Not FRng Is Nothing Then
  25.            A.Offset(, 3) = FRng.Offset(, 9).Value
  26.            If Rng Is Nothing Then Set Rng = A.Offset(, 3) Else Set Rng = Union(Rng, A.Offset(, 3))
  27.         End If
  28.    
  29.        Set FRng = Nothing
  30. Next
  31. End With
  32. Wb.Close 0
  33.    
  34. fs = "W:\Payment Daily Report\Outstanding Payments.xlsm"
  35. Set Wb = Workbooks.Open(fs)
  36. With ThisWorkbook.Worksheets("State")
  37. For Each A In .Range(.[A2], .Range("A1").End(xlDown))
  38.      Set FRng = Wb.Sheets("outstanding payments").Range("A:A").Find(A, LookAt:=xlWhole, SearchDirection:=xlPrevious)
  39.      If Not FRng Is Nothing Then
  40.            A.Offset(, 6) = FRng.Offset(, 4).Value
  41.            If Rng Is Nothing Then Set Rng = A.Offset(, 6) Else Set Rng = Union(Rng, A.Offset(, 6))
  42.         End If
  43.    
  44.        Set FRng = Nothing
  45. Next
  46. End With
  47. Wb.Close 0
  48.    
  49. End Sub
½Æ»s¥N½X
¦^´_ 24# c_c_lai


§Ú¥H«e³o­Óµ{¦¡³£µL°ÝÃD¡A¦ý¤µ¤é¤£ª¾¹D¬°¤°»ò¥X²{°ÝÃD¡A¦bIf Not FRng Is Nothing Then³o¥y¤W¥X²{¡G  code execution has been interrupted
½Ð°Ý¬O¤°»ò·N«ä¡H

TOP

        ÀR«ä¦Û¦b : ¦h°µ¦h±o¡C¤Ö°µ¦h¥¢¡C
ªð¦^¦Cªí ¤W¤@¥DÃD