DEAR ALL ¤j¤j
1.¦p¹Ï¤@ ©ó 2003ª©¥i¥¿±`°õ¦æ,¦ý©óª©¥»2010µLªk¨Ï¥Î
°±©ó Sh.Copy after:=a.Sheets(a.Sheets.Count)
1.1 ½Ð°Ý¦p¦ó³B²z THANKS*10000
¹Ï¤@
Sub yy()
Dim a As Workbook, f$, fn$, k%
Dim p$, Sh As Worksheet
Set a = ThisWorkbook
p = "C:\AAA\"
f = Dir(p & "*.TXT")
Application.ScreenUpdating = False
Do While f <> ""
Workbooks.Open p & f
k = 0
For Each Sh In Worksheets
If Not IsEmpty(Sh.UsedRange) Then
fn = IIf(k = 0, Replace(f, ".TXT", ""), Replace(f, ".TXT", "_") & k)
Sh.Copy after:=a.Sheets(a.Sheets.Count)
ActiveSheet.Name = fn
k = k + 1
End If
Next
Windows(f).Close True
f = Dir
Loop
Application.ScreenUpdating = True
MsgBox "»É±¿n.TXT ¸ê®Æ§ì¨ú¦ÜEXCEL-OK"
Sheet1.Select
Range("A1").Select
End Sub |