标题: Excel多页sheet打开问题--已解决 [打印本页] 作者: 月亮冰 时间: 2009-7-7 14:37 标题: Excel多页sheet打开问题--已解决 问题一:
Dim ExcelApp,ExcelWorkBooks,ExcelSheet( 1 To 4),myTotalColumn( 1 To 4)
为什么老提示缺少')'呢?
问题二:
EfileName="D:\5.xls"
openexcel EfileName
Function OpenExcel(fileName)
Set ExcelApp=CreateObject("Excel.Application")
Set ExcelWorkBooks=ExcelApp.WorkBooks.Open(fileName)
For i= 1 To 4
Set ExcelSheet(i)= ExcelWorkBooks.Worksheets("第"&i&"页")
Next
myTotalColumn(1)= ExcelSheet(1).UsedRange.Columns.Count
End Function