1、
Workbooks.Open Filename:= _
"C:\Documents and Settings\Administrator\My Documents\Book2.xls"
Sheets("Sheet2").Select2、
SELECT *
FROM sysobjects
WHERE (xtype = 'u')
Workbooks.Open Filename:= _
"C:\Documents and Settings\Administrator\My Documents\Book2.xls"
Sheets("Sheet2").Select2、
SELECT *
FROM sysobjects
WHERE (xtype = 'u')
Dim xlApp As Excel.Application
Dim wbzhishu As Excel.Workbook
Dim shtzhishu As Excel.Worksheet On Error Resume Next
Set xlApp = GetObject(, "Excel.Application")
If Err.Number <> 0 Then
Set xlApp = CreateObject("Excel.Application")
End If
Err.Clear
Set wbzhishu = xlApp.Workbooks.Open(filename1)
Set shtzhishu = wbzhishu.Sheets("sheet2")