- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ samwang
±z¦n¡A¦]¬°§Úªº¸ê®Æ§¨¸Ì±¤£¥u¤@ÓexcelÀÉ¡A¥i¥H¥Î«ü©wªº¤è¦¡¶Ü¡H
Workbooks("1. ...
ÅÚ½³ªd µoªí©ó 2021-12-13 09:29
§ï¥Î¿ï¾ÜÀɮפ覡¡A½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim FileOrg$, fc%, wb, a, Dr, Sr, j%
Application.ScreenUpdating = False: Application.DisplayAlerts = False
FileOrg = ActiveWorkbook.Name
Sheets("³sµ²Á`ªí").[a1].CurrentRegion.Offset(1) = ""
With Application.FileDialog(msoFileDialogOpen)
.InitialFileName = "D:\"
.Title = "===========¿ï¾Ü ""¦~«×°V½mÁ`ªí"" ÀÉ®×==========="
.AllowMultiSelect = False: .Show
fc = .SelectedItems.Count: If fc = 0 Then Exit Sub
a = .SelectedItems(1)
Set wb = Workbooks.Open(a)
With Sheets("Á`ªí")
If .FilterMode Then .ShowAllData
Set xA = .[a1]
R = xA(Rows.Count, 1).End(xlUp).Row
Dr = Array(1, 5, 6, 10, 9, 4, 12, 13, 17, 20, 28, 25, 26, 27) '¸ê®Æ¨Ó·½
Sr = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14) '¶¶§Ç
For j = 0 To UBound(Dr)
Workbooks(FileOrg).Sheets("³sµ²Á`ªí").Cells(2, Sr(j)).Resize(R).Value = xA(2, Dr(j)).Resize(R).Value
Next
End With
End With
wb.Close
Set wb = Nothing: Set xA = Nothing
Application.ScreenUpdating = True: Application.DisplayAlerts = True
End Sub |
|