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

[µo°Ý] «ü©w¸ê®Æªí

[µo°Ý] «ü©w¸ê®Æªí

¥»©«³Ì«á¥Ñ v03586 ©ó 2016-11-3 06:07 ½s¿è

½Ð·Q°Ý¤j¤j ¦p¤Uµ{¦¡½X ¦p¦ó­×§ï´M§ä«ü©wªº¸ê®Æªí¦WºÙ

§Ú¦³¨â­ÓÀÉ®×  AÀɮ׬Oª½¦æÀÉ  BÀɮ׬O°Ñ¦Ò¸ê®Æ¨Ó·½
BÀɮתºExcel ¦WºÙ¤£©T©w . ¦ý¤º®eªº¸ê®Æªí¦WºÙ©T©w , ¦p¤U¼gªk ¥u·|§PÂ_ BÀɮתº²Ä¤@­Ó¶¶¦ì¸ê®Æªí , ¥~¥[§PÂ_²Ä¤@­Ó¸ê®Æªí Title Äæ¦ì·í¤¤ªºÃöÁä¦r
°²³]¸ê®Æªí¶¶§Ç¤@½Õ´«´NµLªk§PÂ_...·Q½Ð°Ý¤j¤j¦p¦ó­×§ï§Y¨Ï¸ê®Æªí¶¶§Ç½Õ´«¤]¤£¼vÅTµ{¦¡§PÂ_©O??

¦p¤Uµ{¦¡½X¹B§@¬O¶}±ÒAÀÉ®× »PBÀÉ®× , °õ¦æµ{¦¡«á ·|±NBÀɮתº¸ê®Æ¶×¤JAÀɮ׫ü©wªº¤u§@ªíÄæ¦ì
With Workbooks(i).Sheets(1)
If .Range("A" & title_row).Value Like "A*" And .Range("D" & title_row).Value Like "B*" And .Range("E" & title_row) Like "C*"
Set xS = Workbooks(i).Sheets(1)
  1. Dim UType%
  2. Sub ¶×¤J()

  3. Dim xFile$, x As New Application, xB As Workbook, xS As Worksheet
  4. Dim RepSht As Worksheet, xR As Range, xLab As Range, xAddress$
  5. Set RepSht = Sheets("A")

  6. Application.ScreenUpdating = False
  7. RepSht.UsedRange.EntireRow.Delete
  8.     Dim currentPKG, currentDevice, whichFirst As String
  9.     Dim index As Integer
  10.     Dim hasReport As Boolean
  11.     title_row = 1
  12.     hasReport = False
  13.     For i = 1 To Workbooks.Count
  14.         With Workbooks(i).Sheets(1)
  15.             If .Range("A" & title_row).Value Like "A*" And .Range("D" & title_row).Value Like "B*" And .Range("E" & title_row) Like "C*" Then
  16.                 Set xS = Workbooks(i).Sheets(1)
  17.                 hasReport = True
  18.                 i = Workbooks.Count + 1
  19.             End If
  20.         End With
  21.     Next i
  22.     If hasReport = False Then MsgBox "§ä¤£¨ìÀɮסI¡@": Exit Sub
  23.     R = xS.Cells(Rows.Count, 1).End(xlUp).Row + 5
  24. With RepSht
  25.      .Range("A1:A" & R) = xS.Range("D1:D" & R).Value
  26.      .Range("B1:B" & R) = xS.Range("A1:A" & R).Value
  27.      .Range("C1:C" & R) = xS.Range("AH1:AH" & R).Value
  28.      .Range("D1:D" & R) = xS.Range("C1:C" & R).Value
  29.      .Range("E1:E" & R) = xS.Range("AB1:AB" & R).Value
  30.      .Range("F1:F" & R) = xS.Range("E1:E" & R).Value  
  31.      .Range("G1:G" & R) = xS.Range("F1:F" & R).Value
  32.      .Range("H1:H" & R) = xS.Range("G1:G" & R).Value  
  33.      .Range("I1:I" & R) = xS.Range("J1:J" & R).Value
  34.      .Range("J1:Z" & R) = xS.Range("K1:AA" & R).Value
  35.      .Range("AA1:AA" & R) = xS.Range("AD1:AD" & R).Value

  36. End With
  37. End Sub
½Æ»s¥N½X

¦^´_ 1# v03586
§â"Sheets(1)"¸Ìªº1§ï¦¨¤u§@ªí¦WºÙ´N¦æ¤F

TOP

¦^´_ 2# ¸­°ê¬w


    With Workbooks(i).Sheets(1) ¡÷¡@With Workbooks(i)."¤u§@ªí1"

³o¼Ë¶Ü???

TOP

¦^´_ 3# v03586


    With Workbooks(i).Sheets(1) ¡÷¡@With Workbooks(i).Sheets("¤u§@ªí1")

TOP

¦^´_ 4# starry1314


    ¥X²{°}¦C¤Þ¯Á¶W¥X½d³ò  ¿ù»~

TOP

¦^´_ 5# v03586
§A¤W¶Ç AB ¨âÀɮסA¤£´N©úÁA¤F¡H
¤@¯ë¬O§A¤u§@ªí©w¸qªº¦WºÙ§ä¤£µÛ¡C

TOP

¦^´_ 6# c_c_lai

­nŪ¨úÀɮ׸ê®Æªí¦WºÙ  "H LOT"
¶}±Ò¨â­ÓExcel ÀÉ  ÂI¿ï²£¥Í³øªí

    Report.rar (1013.15 KB)

TOP

¦^´_ 7# v03586
°ÝÃD¥X¦b
  1. Set RepSht = Sheets("FMC")
½Æ»s¥N½X
³æ¿W¶}±Ò "Report_3.xls" ¬OOK ªº¡C
¦ý¬O¦A¶}±Ò "­ì©lÀÉ®×.xlsx" «K¥X°ÝÃD¤F¡A
¦]¬° ActiveWorkbook §ïÅܤF¡C
  1. Set RepSht = Workbooks(1).Sheets("FMC")
½Æ»s¥N½X
«h OK¡C

TOP

¦^´_ 8# c_c_lai

§Ú§ó§ï³o¼Ë ÁÙ¬O¥X²{¿ù»~­C , °}¦C¤Þ¯Á¶W¥X½d³ò
¡õ
With Workbooks(i).Sheets("H LOT")
  1. Dim xFile$, x As New Application, xB As Workbook, xS As Worksheet
  2. Dim RepSht As Worksheet, xR As Range, xLab As Range, xAddress$
  3. Set RepSht = Sheets("FMC")

  4. Sheets("FMC").Activate
  5. Application.ScreenUpdating = False

  6. RepSht.UsedRange.EntireRow.Delete
  7.     Dim currentPKG, currentDevice, whichFirst As String
  8.     Dim index As Integer
  9.     Dim hasReport As Boolean
  10.     title_row = 1
  11.     hasReport = False
  12.     For i = 1 To Workbooks.Count
  13.         With Workbooks(i).Sheets("H LOT")
  14.             If .Range("A" & title_row).Value Like "MONBR*" And .Range("D" & title_row).Value Like "DEVICE*" And .Range("E" & title_row) Like "PKG*" Then
  15.                 Set xS = Workbooks(i).Sheets("H LOT")
  16.                 hasReport = True
  17.                 i = Workbooks.Count + 1
  18.             End If
  19.         End With
  20.     Next i
  21.     If hasReport = False Then MsgBox "¡±ä¤£¨ì³øªíÀÉ¡I¡@": Exit Sub
  22.     R = xS.Cells(Rows.Count, 1).End(xlUp).Row + 5
½Æ»s¥N½X

TOP

¦^´_ 9# v03586
  1. Sub ·s³øªí_HQ¶×¤J()
  2.     'timeStamp = Now
  3.     Dim xFile$, x As New Application, xB As Workbook, xS As Worksheet
  4.     Dim RepSht As Worksheet, xR As Range, xLab As Range, xAddress$
  5.     Set RepSht = Workbooks(1).Sheets("FMC")
  6.    
  7.     Sheets("FMC").Activate
  8.     Application.ScreenUpdating = False
  9.    
  10.     RepSht.UsedRange.EntireRow.Delete
  11.     Dim currentPKG, currentDevice, whichFirst As String
  12.     Dim index As Integer
  13.     Dim hasReport As Boolean
  14.     title_row = 1

  15.     hasReport = False
  16.     With Workbooks.Open(ThisWorkbook.Path & "\­ì©lÀÉ®×.xlsx")
  17.         With Sheets("H LOT")
  18.             If .Range("A" & title_row).Value Like "MONBR*" And .Range("D" & title_row).Value Like "DEVICE*" And .Range("E" & title_row) Like "PKG*" Then
  19.                 Set xS = Sheets("H LOT")
  20.                 hasReport = True
  21.             End If
  22.         End With
  23.         If hasReport = False Then MsgBox "§ä¤£¨ì³øªíÀÉ¡I¡@": Exit Sub
  24.         R = xS.Cells(Rows.Count, 1).End(xlUp).Row + 5
  25.         With RepSht
  26.             .Range("A1:A" & R) = xS.Range("E1:E" & R).Value  'pkg
  27.             .Range("B1:B" & R) = xS.Range("A1:A" & R).Value  'MO
  28.             .Range("C1:C" & R) = xS.Range("G1:G" & R).Value 'MO Lot
  29.             .Range("D1:D" & R) = xS.Range("S1:S" & R).Value 'Machine
  30.             .Range("E1:E" & R) = xS.Range("Z1:Z" & R).Value 'PCCode
  31.             .Range("F1:F" & R) = xS.Range("D1:D" & R).Value         'Device
  32.             .Range("G1:G" & R) = xS.Range("F1:F" & R).Value  'input Date
  33.             .Range("H1:H" & R) = xS.Range("M1:M" & R).Value   'DavinciCode
  34.             .Range("I1:I" & R) = xS.Range("N1:N" & R).Value  'Thickness
  35.             .Range("J1:J" & R) = xS.Range("AA1:AA" & R).Value  'SitePath
  36.             .Range("K1:K" & R) = xS.Range("Q1:Q" & R).Value  'WS Tool
  37.             .Range("L1:L" & R) = xS.Range("R1:R" & R).Value  ' Status
  38.             .Range("M1:M" & R) = xS.Range("H1:H" & R).Value  'WIP
  39.             .Range("N1:N" & R) = xS.Range("J1:J" & R).Value  ' WaferPcs
  40.             .Range("O1:O" & R) = xS.Range("AB1:AB" & R).Value  ' DA Flow
  41.             .Range("P1:P" & R) = xS.Range("AC1:AC" & R).Value  ' LastMO
  42.             .Range("Q1:Q" & R) = xS.Range("V1:V" & R).Value  'B/D
  43.             .Range("R1:AD1") = Split("TBG1,PGH1,WG,LWS1,DE01,FL01,SLS1,WM01,WS01,UTI1,VS01,QVS1,DB,", ",")
  44.             
  45.             .Range("AF1:AF" & R) = xS.Range("J1:J" & R).Value  ' WaferPcs Cut
  46.         End With
  47.         .Close
  48.     End With
  49.     '
  50.     '
  51.     '  ***  ¥H¤U¥¼¸g­×¥¿  ***
  52.     '
  53.     '
  54. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¸Ü¦h¤£¦p¸Ü¤Ö¡A¸Ü¤Ö¤£¦p¸Ü¦n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD