Dim xlApp As Excel.Application
Dim xlBook As Workbook, xlSheet As Worksheet
Set xlApp = CreateObject("Excel.Application")
Set xlApp = New Excel.Application
Set xlBook = xlApp.Workbooks.Open(CurrentProject.Path & "\report\分户帐.XLS") '打开要输出的EXECL文件
Set xlSheet = xlBook.Worksheets(1) '打开工作表,这里是第一个,可以设其他
xlApp.Visible = True '显示