# 用VB开EXCEL档,并写入会何出现错误

Posted by Peter on May 27, 1998 at 04:59:24:

Dim xbook As Excel.Workbook
Dim xapp As Excel.Application
Set xapp = New Excel.Application
xapp.Application.Workbooks.Open "d:\test\test1.xls"
Set xbook = Workbooks.Application.Item(1) ==>此行为何有错?
With xapp.Worksheets("sheet1")
Worksheets(1).Cells(10, 5).Value = 10
End With
xbook.Save
xbook.Close
xapp.Quit
Set xapp = Nothing
Set xbook = Nothing

Follow Ups:

- 当然不对 小吴 17:41:17 5/27/98 (1)
  - 范例: vb6 连上Excel 陈进富 01:02:43 5/29/98 (0)