- ©«¤l
- 57
- ¥DÃD
- 21
- ºëµØ
- 0
- ¿n¤À
- 83
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2015-9-18
- ³Ì«áµn¿ý
- 2022-9-13
|
¦^´_ 9# lpk187
§Ú¸Õ¹L¤F!¥i¥H¦ý¦³¤@Ó¦a¤è·|¿ù»~¡A²Ä¤@¦¸¸ê®ÆÂà¥X¥i¥H¡A¦A«ö²Ä¤G¦¸¥L·|¥X²{¤U¹Ï
- Sub Workbook_Open2()
- 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:F1")
- arrb = Sheets("¤u§@ªí1").Range("A2:F2")
- 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).Resize(UBound(arra), UBound(arra, 2)) = arra
- End With
- 10:
- Workbooks(xlFilea).Close True
- Workbooks.Open (xlPath & xlFileb)
- With Workbooks(xlFileb).Worksheets("¤u§@ªí1")
- Set da = .Columns(1).Find(arrb(1, 1), , , , , 2)
- If Not da Is Nothing Then GoTo 10
- Ro = .Cells(65535, 1).End(xlUp).Row + 1
- .Cells(Ro, 1).Resize(UBound(arrb), UBound(arrb, 2)) = arrb
- End With
- 20:
- Workbooks(xlFileb).Close True
- End Sub
½Æ»s¥N½X ¥t¤@¤è±¦pªG¶Ç°e¤è¦¡Åܦ¨¦p¤U¹Ï
c.xlsx·|¦³¨ç¼Æ¥hpºâ¼ÆÈ¡A¥i¥H¸õ®æ¶Ç°e¶Ü
|
|