¨úlist ¤£ª¾¦p¦ó¥i¶i¶¥¤@¤U, ??
- ©«¤l
- 34
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 56
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS10
- ³nÅ骩¥»
- office 2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-16
|
¨úlist ¤£ª¾¦p¦ó¥i¶i¶¥¤@¤U, ??
dear..
¥H¤U, ?¤§®Ç,,«ü¥O,,,¤£ª¾,¦p¦ó.¥i¶i¶¥¤@¤U,
if a2 ¬°bbb .. ThisWorkbook.Sheets("List").[a2].Offset(lngCurrRow) = wbCurr.Sheets(1).[a2]
¬°ccc.. ThisWorkbook.Sheets("List").[a2].Offset(lngCurrRow) = wbCurr.Sheets(1).[a5]
¤£ª¾,¦p¦ó°µ, -->
¥Øªº:¨úlist ¤§¤å¦rÀÉ,±Æ¦C¤£¦P,¦³¦n´XºØ:
Sub Button1_Click()
Dim fso As Object
Dim objFile As Object
Dim objFolder As Object
Dim wbCurr As Workbook
ThisWorkbook.Sheets("List").Select
Application.ScreenUpdating = False
Set fso = CreateObject("Scripting.FileSystemObject")
Cells.Select
Selection.Clear
[a1].Select
Dim lngCurrRow As Long
Set objFolder = fso.GetFolder(ThisWorkbook.Path)
lngCurrRow = 0
For Each objFile In objFolder.Files
If Right(objFile.Name, 4) = ".txt" Then
Set wbCurr = Application.Workbooks.Open(Filename:=objFile.Path)
? If wbCurr.Sheets(1).[a1] <> "" Then
? ThisWorkbook.Sheets("List").[a2].Offset(lngCurrRow) = wbCurr.Sheets(1).[a1]
? ThisWorkbook.Sheets("List").[b2].Offset(lngCurrRow) = wbCurr.Sheets(1).[a2]
? lngCurrRow = lngCurrRow + 1
? End If wbCurr.Close (False)
End If
Set wbCurr = Nothing
Next |
-
-
test.rar
(4.5 KB)
|
|
|
|
|
|
- ©«¤l
- 34
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 56
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS10
- ³nÅ骩¥»
- office 2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-16
|
|
|
|
|
|
|