Dim WB As Object, w1 As Object, w2 As Object Set WB = GetObject("Excel.Application")For Each w1 in WB.Worksheets……Next w1
这个应该是引用里缺少MICROSOFT EXCEL 的引用比如你可以引用MICROSOFT EXCEL 11.0 OBJECT LIBRARY