- ©«¤l
- 12
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 53
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- off 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-7-4
- ³Ì«áµn¿ý
- 2023-5-12
|
Sub Ex()
Dim MergePath As String, FS As String, Rng As Range
MergePath = "C:\Documents and Settings\choikeun\Desktop\New" '¦X¨ÖÀɮתº¸ê®Æ§¨
FS = Dir(MergePath & "*.xls") '´M§ä xls ÀÉ®×
If FS <> "" Then
Set Rng = Workbooks.Add(xlWBATWorksheet).Sheets(1).[a1] '·s¶}ªºÀÉ®×(¥u¦³¤@±i¤u§@ªí)¤u§@ªíªºA1
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Do
With Workbooks.Open(MergePath & FS)
.Sheets(1).UsedRange.Copy Rng 'MergePath & ¤¤¤u§@ªí¸ê®Æ ½Æ»s¨ìRng
.Close
End With
FS = Dir 'Ä~Äò´M§ä(MergePath & "*.XLS")
Set Rng = Rng.End(xlDown).Offset(1) '«³]Rng ¬°©¹¤U¨ì³Ì«á¦³¸ê®ÆªºÀx¦s®æ¤U¤@Ӫťդ§Àx¦s®æ
Loop While FS <> ""
Application.DisplayAlerts = False
Rng.Parent.Parent.SaveAs MergePath & "¦X¨Ö.xls" '¦X¨ÖÀɦsÀÉ
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Else
MsgBox MergePath & " ¨S¦³ xls ÀÉ®×"
End If
End Sub
§Ú¤w¸gקï¤F,,¦ý¬O³£¤£¦æ........... |
|