- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-25
|
¦^´_ 7# dea172 - Private Sub CommandButton2_Click()
- Dim Arr, Brr, i&, j%, xE As Range
- Arr = [A3:J17]
- ReDim Brr(1 To 2, 1 To [A:AV].Columns.Count)
- Brr(1, 1) = Split([G1], "-")(0) & "-FQC3"
- Brr(2, 1) = Split([G1], "-")(0) & "-FQC2"
- Brr(1, 2) = Year([C1]): Brr(2, 2) = Year([C1])
- Brr(1, 3) = [C1]: Brr(2, 3) = [C1]
- Brr(1, 4) = [E1]: Brr(2, 4) = [L2]
- For i = 0 To UBound(Arr) - 1
- If i >= UBound(Arr) - 2 Then '³Ì«á¨âµ§(L/M)
- For j = 5 To 6: Brr(1, i * 3 + j) = Arr(i + 1, j + 1): Next j '¥u§ì«e2®æ
- Else
- For j = 5 To 7: Brr(1, i * 3 + j) = Arr(i + 1, j + 1): Next j '§ì«e3®æ
- For j = 5 To 6: Brr(2, i * 3 + j) = Arr(i + 1, j + 4): Next j '§ì«á2®æ
- End If
- Next i
- Dim xN$, xB As Workbook, xS As Worksheet, xF As Range
- xN = "L-15-3-2018-FQC.xls"
- On Error Resume Next '¥H¤U¤T¦æ¥i¥HÀˬdFQC¬O§_¶}±Ò¤¤
- Set xB = Workbooks(xN)
- If xB Is Nothing Then Set xB = Workbooks.Open(ThisWorkbook.Path & "\" & xN) 'Y¥¼¶}±Ò,°õ¦æ¶}±ÒÀÉ®×
- On Error GoTo 0
- If xB Is Nothing Then MsgBox "§ä¤£¨ì¡e" & xN & "¡fÀÉ®×": Exit Sub
- Set xS = xB.Sheets("¿é¤Jªí")
- Set xF = xS.[A:A].Find(Split(Brr(1, 1), "-")(0), Lookat:=xlPart)
- If Not xF Is Nothing Then MsgBox "§å¸¹«ÂÐ": xB.Close 0: Exit Sub
- Set xE = xS.[A65536].End(xlUp)(2)
- If xE.Row < 6 Then Set xE = xE(2)
- xE.Resize(2, UBound(Brr, 2)) = Brr
- xB.Close 1 'Ãö³¬FQC, ¨Ã¦sÀÉ
- End Sub
½Æ»s¥N½X
L-15-3-2018-IPQC.rar (75.84 KB)
|
|