- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¦^´_ 8# mark761222
¸Õ¸Õ¬Ý- Private 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
½Æ»s¥N½X |
|