| ©«¤l552 ¥DÃD3 ºëµØ0 ¿n¤À578 ÂI¦W0  §@·~¨t²Îwin7 ³nÅ骩¥»office 2010 ¾\ŪÅv50 ©Ê§O¨k µù¥U®É¶¡2015-2-8 ³Ì«áµn¿ý2024-7-9 
   
 | 
                
| ¦^´_ 8# mark761222 
 ¸Õ¸Õ¬Ý
 ½Æ»s¥N½XPrivate Sub Workbook_Open()
Dim xlPath As Variant, Ro As Integer
Dim xlFilea, xlFileb, arra, arrb
    xlPath = ThisWorkbook.Path & "\"
xlFilea = ("B.xlsx")
xlFileb = ("C.xlsx")
arra = Sheets("¤u§@ªí1").Range("A1:E1")
arrb = Sheets("¤u§@ªí1").Range("A2:E2")
    Workbooks.Open (xlPath & xlFilea)
    With Workbooks(xlFilea).Worksheets("¤u§@ªí1")
        Set da = .Columns(1).Find(arra(1, 1), , , , , 2)
        If Not da Is Nothing Then GoTo 10
         Ro = .Cells(65535, 1).End(xlUp).Row + 1
         
        .Cells(Ro, 1) = arra
    End With
10:
    Workbooks(xlFilea).Close True
    Workbooks.Open (xlPath & xlFileb)
    With Workbooks(xlFileb).Worksheets("¤u§@ªí1")
        Set da = .Columns(1).Find(arra(1, 1), , , , , 2)
        If Not da Is Nothing Then GoTo 10
        Ro = .Cells(65535, 1).End(xlUp).Row + 1
        .Cells(Ro, 1) = arrb
    End With
20:
    Workbooks(xlFileb).Close True
End Sub
 | 
 |