这样就行了! - On Error Resume Next
- Set excelApp = GetObject(, "Excel.application")
- If Err Then
- Err.Clear
- Set excelApp = CreateObject("Excel.application")
- If Err Then
- MsgBox ("不能运行Excel 2000,请检查是否安装了Excel 2000")
- Exit Sub
- End If
- excelApp.Workbooks.Add
- End If
- excelApp.Visible = True
|