这是我的代码:
Dim xlApp As New Excel.Application
Dim xlBook As New Excel.Workbook
Dim xlSheet As New Excel.Worksheet
Private Sub Command1_Click()
On Error Resume Next
'后台进程运行excel程序,并得到该工作簿
Set xlBook = xlApp.Workbooks.Open("E:\Work\检索.xls")
xlApp.Visible = False
'获得该工作簿的“sheet1”表
Set xlSheet = xlBook.Sheets("sheet1")
xlSheet.Select
'抽取a1格子的数据并赋值给text1.text
Text1.Text = xlSheet.Range("a1")
'释放资源,顺序到过来,表》》簿》》应用程序
Set xlSheet = Nothing
Set xlBook = Nothing
xlApp.Quit
Set xlApp = Nothing
End Sub
我得到a1的只是那个链接的地址,不会打开。。。那个链接的是CAD文件。。。请指教啊
代码怎么改