标题:怎么编译错误?
只看楼主
asad
Rank: 1
等 级:新手上路
威 望:1
帖 子:67
专家分:0
注 册:2019-12-6
得分:0 
Sub text()
    Dim MyFile, i As Long, sh As Excel.Worksheet
    MyFile = xlapp.GetOpenFilename(fileFilter:="Excel文件(*.xls),*.xls", Title:="选择Excel文件", MultiSelect:=True)
    If TypeName(MyFile) = "Boolean" Then Exit Sub
    xlapp.ScreenUpdating = False
    Set sh = xlapp.ActiveSheet
    For i = 1 To UBound(MyFile)
        If MyFile(i) <> xlapp.ActiveWorkbook.FullName Then
            With GetObject(MyFile(i))
                .Sheets("sheet1").UsedRange.Offset(5).Copy sh.Range("a" & xlapp.Rows.Count).End(xlUp).Offset(1)
                .Close 0
             End With
        End If
    Next
    xlapp.ScreenUpdating = True
End Sub
2020-01-16 11:25



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-486491-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.223252 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved