|
楼主 |
发表于 2014-6-9 22:06
|
显示全部楼层
自己回复了~~~已经搞定!
程序如下
Sub MergeWorkbooks()
Dim FileSet
Dim i As Integer
On Error GoTo 0
Application.ScreenUpdating = False
FileSet = Application.GetOpenFilename(FileFilter:="Excel 2007(*.csv),*.csv", _
MultiSelect:=True, Title:="选择要合并的文件")
If TypeName(FileSet) = "Boolean" Then
GoTo ExitSub
End If
For Each Filename In FileSet
Workbooks.Open Filename
Sheets().Move After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
Next
ExitSub:
Application.ScreenUpdating = True
End Sub |
|