- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 248
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-16
|
¦^´_ 1# v60i
¥Î¸ê®Æ§¨¹ï¸Ü¤è¶ôµ²ªG¨ú¥NThisWorkbook.Path- Sub ¶×¤J¤å¦rÀÉ()
- Dim xFile, uFile, uHead As Range, Jm&, Km&, X, xT, xL
- Range("A:A").Clear '²M°£Â¶פJ¸ê®Æ
- '-----------------------------------------------------
- With Application.FileDialog(msoFileDialogFolderPicker)
- .Show
- fd = .SelectedItems(1)
- End With
- Application.ScreenUpdating = False
- Do
- If xChk = 0 Then
- xFile = Dir(fd & "\*.txt")
- If xFile = "" Then MsgBox "¡°§ä¤£¨ì TXT ÀɮסI¡@", 0 + 16: Exit Sub
- xChk = 1
- Else
- xFile = Dir
- If xFile = "" Then Exit Do
- End If
- '----------------------------------------------
- uFile = fd & "\" & xFile
- Set uHead = Range("A65536").End(xlUp)
- If uHead <> "" Then Set uHead = uHead(3, 1)
- With ActiveSheet.QueryTables.Add(Connection:="TEXT;" & uFile, Destination:=uHead)
- .AdjustColumnWidth = False
- .TextFileColumnDataTypes = Array(1)
- .Refresh BackgroundQuery:=False
- .Delete
- End With
- uHead.Interior.ColorIndex = 6
- '¨Cµ§²Ä¤@®æ¥[¡e¶À¦â¡f©³
- NEXT_LINE:
- Loop
- '-------------------------------------------------------
- Application.ScreenUpdating = True
- MsgBox "¡ã¡ã¶×¤J§¹¦¨¡ã¡ã¡@"
- End Sub
½Æ»s¥N½X |
|